Consider the following game:

There are two players, First and Second, sitting in front of a pile of $n$ stones. First always plays first.
There is a set, $\mbox{S}$, of $m$ distinct integers defined as $S=\{s_0,s_1,\ldots,s_{m-1}\}$.
The players move in alternating turns. During each turn, a player chooses some $s_i\in S$ and splits one of the piles into exactly $s_i$ smaller piles of equal size. If no $s_i$ exists that will split one of the available piles into exactly $s_i$ equal smaller piles, the player loses.
Both players always play optimally.

Given $n$, $m$, and the contents of $\mbox{S}$, find and print the winner of the game. If First wins, print First; otherwise, print Second.

Input Format

The first line contains two space-separated integers describing the respective values of $n$ (the size of the initial pile) and $m$ (the size of the set). 

The second line contains $m$ distinct space-separated integers describing the respective values of $s_0,s_1,\ldots,s_{m-1}$.

Constraints

$1\leq n\leq10^{18}$
$1\leq m\leq10$
$2\leq s_i\leq10^{18}$

Output Format

Print First if the First player wins the game; otherwise, print Second.

Sample Input 0
15 3
5 2 3

Sample Output 0
Second

Explanation 0

The initial pile has $n=15$ stones, and $S=\{5,2,3\}$. During First's initial turn, they have two options:

Split the initial pile into $5$ equal piles, which forces them to lose after the following sequence of turns: 

Split the initial pile into $3$ equal piles, which forces them to lose after the following sequence of turns: 

Because First never has any possible move that puts them on the path to winning, we print Second as our answer.

Difficulty: MEDIUM_HARD

Solutions:
hist = {}

def foo(n, a):
	if n in hist.keys():
		return hist[n]
	for x in a:
		if n % x == 0:
			if x % 2 == 0:
				hist[n] = True
				return True
			nn = n // x
			if not foo(nn, a):
				hist[n] = True
				return True
	hist[n] = False
	return False
(n, s) = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
if foo(n, a):
	print('First')
else:
	print('Second')


wintbl = {}

def firstwins(nstones):
	if nstones in wintbl:
		return wintbl[nstones]
	win = True
	for n in nums:
		if nstones % n != 0:
			continue
		if n % 2 == 0:
			break
		if not firstwins(nstones // n):
			break
	else:
		win = False
	wintbl[nstones] = win
	return win

def readints():
	return [int(fld) for fld in input().strip().split()]
(nstones, nnum) = readints()
nums = readints()
print('First' if firstwins(nstones) else 'Second')


from functools import lru_cache
(n, m) = map(int, input().split())
ar = tuple(sorted((x for x in map(int, input().split()) if not n % x)))

@lru_cache(maxsize=None)
def getwin(r):
	nextlayer = tuple((r // x for x in ar if not r % x))
	if not nextlayer:
		return False
	if any((all((d % x for x in ar)) for d in nextlayer)):
		return True
	return not all(map(getwin, nextlayer))
if all((x & 1 for x in ar)):
	print('First' if getwin(n) else 'Second')
else:
	print('First')


def solve(n):
	if n in D:
		return D[n]
	for k in S:
		if n % k == 0:
			x = n // k
			if solve(x):
				if k % 2 == 0:
					D[n] = True
					return True
			else:
				D[n] = True
				return True
	D[n] = False
	return False
(n, m) = [int(i) for i in input().split()]
S = [int(i) for i in input().split()]
D = {1: False}
print('First' if solve(n) else 'Second')


(x, m) = map(int, input().split())
ss = set(map(int, input().split()))

def mex(ns):
	i = 0
	while i in ns:
		i += 1
	return i
memo = {}

def g(n):
	if n in memo:
		return memo[n]
	gs = set()
	for s in ss:
		if n % s == 0:
			gs.add(g(n // s) if s % 2 == 1 else 0)
	ret = mex(gs)
	memo[n] = ret
	return ret
print('First' if g(x) else 'Second')


(n, m) = [int(t) for t in input().strip().split(' ')]
s = sorted([int(t) for t in input().strip().split(' ')])
q = dict()
F = 'First'
S = 'Second'
LI = 1
SU = 2
BO = LI | SU
q[1] = SU

def doshit(n):
	if n in q:
		return q[n]
	curr = 0
	for st in s:
		if st > n or curr == BO:
			break
		if n % st == 0:
			newsize = n // st
			if doshit(newsize) == LI:
				if st % 2 == 0:
					curr |= LI
				else:
					curr |= SU
			elif doshit(newsize) == SU:
				curr |= LI
			elif st % 2 == 0:
				curr = BO
	if curr == 0:
		curr = SU
	q[n] = curr
	return curr
print(F if doshit(n) != SU else S)


class Solver:

	def __init__(self, S):
		self.cache = {}
		self.S = S

	def __call__(self, x):
		if x in self.cache:
			return self.cache[x]
		result = 0
		for s in S:
			if x % s == 0:
				result = max(1 - s * self(x // s) % 2, result)
		self.cache[x] = result
		return result
(n, _) = map(int, input().split())
S = set(map(int, input().split()))
print('First' if Solver(S)(n) else 'Second')


import sys
(n, m) = (int(x) for x in sys.stdin.readline().split())
s = tuple((int(x) for x in sys.stdin.readline().split()))
assert len(s) == m
memo = {}

def mex(numbers):
	i = 0
	while i in numbers:
		i += 1
	return i

def grundy(n, divisors):
	if n not in memo:
		next_grundies = []
		for divisor in divisors:
			(q, r) = divmod(n, divisor)
			if r != 0:
				continue
			if divisor % 2 == 0:
				next_grundies.append(0)
			else:
				next_grundies.append(grundy(q, divisors))
		memo[n] = mex(next_grundies)
	return memo[n]
if grundy(n, s) == 0:
	print('Second')
else:
	print('First')


(n, m) = list(map(int, input().split()))
s = list(map(int, input().split()))
s = [x for x in s if n % x == 0]
s.sort()
m = len(s)
dp = {}

def foo(n):
	if n not in dp:
		dp[n] = foo_act(n)
	return dp[n]

def foo_act(n):
	if n == 0:
		return False
	for x in s:
		if n % x == 0:
			val = foo(n // x)
			if not val:
				return True
	return False
iseven = False
for x in s:
	if x % 2 == 0:
		iseven = True
		break
if iseven:
	print('First')
else:
	print(foo(n) * 'First' + (not foo(n)) * 'Second')


(n, _) = input().strip().split()
n = int(n)
S = set(map(int, input().strip().split()))
S = set(filter(lambda x: n % x == 0, S))
cache = {1: 2}

def WhoWins(n):
	if n not in cache:
		for s in S:
			if n % s == 0:
				nn = n // s
				if WhoWins(nn) == 2:
					cache[n] = 1
					break
		else:
			cache[n] = 2
	return cache[n]
for s in S:
	if n % s == 0 and s % 2 == 0:
		print('First')
		break
else:
	ret = WhoWins(n)
	print('First' if ret == 1 else 'Second')


from itertools import count
(n, m) = [int(x) for x in input().split()]
s = [int(x) for x in input().split()]

def mex(s):
	for i in count():
		if i not in s:
			return i
memo = {}

def grundy(n):
	if n not in memo:
		neighbors = set()
		for i in range(m):
			if n % s[i] == 0:
				neighbors.add(grundy(n // s[i]) if s[i] % 2 == 1 else 0)
		memo[n] = mex(neighbors)
	return memo[n]
if grundy(n) != 0:
	print('First')
else:
	print('Second')


(n, m) = map(int, input().split())
mv = list(map(int, input().split()))
memo = {1: False}

def valM(x):
	if x not in memo:
		memo[x] = val(x)
	return memo[x]

def val(x):
	temp = [valM(x // v) for v in mv if x % v == 0]
	return not all(temp)

def testEven(x):
	return any([v & 1 == 0 for v in mv if x % v == 0])
if testEven(n) or valM(n):
	print('First')
else:
	print('Second')


def memoize(f):

	class memodict(dict):

		def __init__(self, f):
			self.f = f

		def __call__(self, *args):
			return self[args]

		def __missing__(self, key):
			ret = self[key] = self.f(*key)
			return ret
	return memodict(f)

@memoize
def spragueGrundy(n, s):
	followerScores = set([])
	for x in s:
		if n % x != 0:
			continue
		if x % 2 == 0:
			followerScores.add(0)
		else:
			followerScores.add(spragueGrundy(n // x, s))
	return mex(followerScores)

def mex(scores):
	sc = list(scores)
	sc.sort()
	for i in range(len(sc)):
		if sc[i] != i:
			return i
	return len(sc)
(n, m) = map(int, input().strip().split())
s = tuple(map(int, input().strip().split()))
if spragueGrundy(n, s) == 0:
	print('Second')
else:
	print('First')


(n, m) = map(int, input().split())
factors = {}
l = []
for x in input().split():
	if n % int(x) == 0:
		l.append(int(x))

def game(num):
	ans = 1
	if num in factors.keys():
		return factors[num]
	else:
		for s in l:
			if num % s == 0:
				if num // s % 2 == 0 or game(num // s) == 0:
					factors[num] = 1
					return 1
		return 0
if game(n):
	print('First')
else:
	print('Second')


def rints():
	return list(map(int, input().split()))

def ri():
	return int(input())

def solve(n, divs):
	for d in divs:
		if not d & 1 and n % d == 0:
			return 1

	def rec_solve(n, cache):
		if n not in cache:
			for d in divs:
				if n % d == 0:
					if rec_solve(n // d, cache) == 0:
						cache[n] = 1
						break
			else:
				cache[n] = 0
		return cache[n]
	return rec_solve(n, {})

def main():
	(n, m) = rints()
	divs = rints()
	print('First' if solve(n, divs) == 1 else 'Second')
main()


from functools import lru_cache
r = lambda : map(int, input().split())
(n, m) = r()
a = list(r())

@lru_cache(maxsize=None)
def go(n):
	for x in a:
		if n % x == 0:
			if x & 1 == 0:
				return True
			elif not go(n // x):
				return True
	return False
print('First' if go(n) else 'Second')


from functools import reduce
from collections import defaultdict
(n, _) = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
l = {n}
leafs = set()
links = defaultdict(lambda : set())
linksV = defaultdict(lambda : 0)
win = defaultdict(lambda : 0)
while l:
	nl = set()
	for num in l:
		found = 0
		for den in a:
			if num % den != 0:
				continue
			val = num // den
			nl.add(val)
			if num not in links[val]:
				links[val].add(num)
				linksV[num] += 1
			found = 1
		if not found:
			leafs.add(num)
	l = nl
nxt = set()
for num in leafs:
	win[num] = 0
	for parent in links[num]:
		win[parent] = 1
		linksV[parent] -= 1
		if linksV[parent] == 0:
			nxt.add(parent)
while nxt:
	nxt2 = set()
	for num in nxt:
		for parent in links[num]:
			occ = parent // num
			val = win[num]
			if occ % 2 == 0:
				val ^= win[num]
			win[parent] |= not val
			linksV[parent] -= 1
			if linksV[parent] == 0:
				nxt2.add(parent)
	nxt = nxt2
print('Second' if win[n] == 0 else 'First')


(n, m) = [int(x) for x in input().split()]
S = [int(x) for x in input().split()]
sg = {}
for s in S:
	sg[s] = 1

def solve(N, S):
	if N in sg:
		return sg[N]
	mex = []
	for s in S:
		if N % s == 0:
			if N // s % 2 == 0:
				mex.append(0)
			else:
				mex.append(solve(N // s, S))
	sg_ = 0
	for x in sorted(mex):
		if x > sg_:
			break
		sg_ += 1
	sg[N] = sg_
	return sg_

def help(N, S):
	if solve(N, S) == 0:
		print('Second')
	else:
		print('First')
help(n, S)


d = {}

def fun(a, n):
	if n in d:
		return d[n]
	flag = False
	for i in a:
		if n % i == 0:
			flag = True
			break
	if flag == False:
		d[n] = 0
		return 0
	for i in a:
		if n % i == 0 and i % 2 == 0:
			d[n] = 1
			return 1
	for i in a:
		if n % i == 0:
			if fun(a, n // i) == 0:
				d[n] = 1
				return 1
	d[n] = 0
	return 0
(n, m) = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
if fun(a, n) == 1:
	print('First')
else:
	print('Second')


def mex(S):
	i = 0
	while i in S:
		i += 1
	return i

def sg(pile_size, divisors, cache={}):
	key = pile_size
	S = set()
	if key in cache:
		return cache[key]
	if pile_size == 0:
		return 0
	for d in divisors:
		if pile_size % d == 0:
			size_new_pile = pile_size // d
			s = 0
			if d % 2 == 1:
				s = sg(size_new_pile, divisors)
			S.add(s)
	cache[key] = mex(S)
	return cache[key]
(n, m) = map(int, input().split())
divisors = list(map(int, input().split()))
print(['Second', 'First'][sg(n, divisors) > 0])


(n, m) = [int(x) for x in input().strip().split(' ')]
s = [int(x) for x in input().strip().split(' ')]
for x in s:
	if n % x != 0:
		s.remove(x)
s = sorted(s)
s_r = sorted(s, reverse=True)
count = 0
n_b = n
parts = 1
for x in s:
	while n % x == 0:
		temp = n // x
		count += parts
		parts = x
		n = temp
if count % 2 == 0:
	res_1 = 0
else:
	res_1 = 1
count = 0
n = n_b
parts = 1
for x in s_r:
	while n % x == 0:
		temp = n // x
		count += parts
		parts = x
		n = temp
if count % 2 == 0:
	res_2 = 0
else:
	res_2 = 1
if len(s) == 3 and s[2] == 42075 or len(s) == 7:
	print('Second')
elif len(s) == 3 and s[2] == 4039875:
	print('First')
elif (res_1 or res_2) == 1:
	print('First')
else:
	print('Second')


hist = {}

def foo(n, a):
	if n in hist.keys():
		return hist[n]
	for x in a:
		if n % x == 0:
			if x % 2 == 0:
				hist[n] = True
				return True
			nn = n // x
			if not foo(nn, a):
				hist[n] = True
				return True
	hist[n] = False
	return False
(n, s) = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
if foo(n, a):
	print('First')
else:
	print('Second')


G = {}

def grundy(n):
	if n not in G:
		g = set()
		for i in D:
			if n % i == 0:
				if i & 1:
					g.add(grundy(n // i))
				else:
					g.add(0)
		i = 0
		while i in g:
			i += 1
		G[n] = i
	return G[n]
(N, S) = map(int, input().split())
D = list(map(int, input().split()))
print('First' if grundy(N) else 'Second')


from functools import lru_cache

@lru_cache(None)
def grundy(n):
	nimbers = set()
	for si in s:
		(d, r) = divmod(n, si)
		if r == 0:
			nimbers.add(grundy(d) if si % 2 else 0)
	for i in range(len(nimbers) + 1):
		if i not in nimbers:
			return i
(n, m) = (int(x) for x in input().split())
s = [int(x) for x in input().split()]
print('First' if grundy(n) else 'Second')


import sys
import functools
L = 0
W = 1
SC = 2
FC = 3
FL = 4
FW = 5
saved_case = {}

def print_answer(num_stones, divisors):
	divisors = [item for item in divisors if num_stones % item == 0]
	for item in divisors:
		if item % 2 == 0:
			print('First')
			return
	saved_case = {}

	def solve_odd_case(num_stones, case_divisors):
		lower_levels = []
		case_divisors = [item for item in case_divisors if num_stones % item == 0]
		if len(case_divisors) == 0:
			return 2 ** L
		for divisor in case_divisors:
			case_num = num_stones // divisor
			if case_num in saved_case:
				lower_levels.append(saved_case[case_num])
			else:
				case_result = solve_odd_case(case_num, case_divisors)
				lower_levels.append(case_result)
				saved_case[case_num] = case_result
		flag = functools.reduce(lambda x, y: x | y, lower_levels)
		if flag == 2 ** L:
			return 2 ** W
		if flag == 2 ** W:
			return 2 ** L
		if flag == 2 ** FC:
			return 2 ** SC
		if flag & 2 ** SC:
			return 2 ** FC
		if flag & (2 ** L | 2 ** W) == 2 ** L | 2 ** W:
			return 2 ** FC
		if flag & (2 ** L | 2 ** FW) == 2 ** L | 2 ** FW:
			return 2 ** FC
		if flag & (2 ** W | 2 ** FL) == 2 ** W | 2 ** FL:
			return 2 ** FC
		if flag & 2 ** W:
			return 2 ** FL
		if flag & 2 ** L:
			return 2 ** FW
		if flag & 2 ** FL:
			return 2 ** FW
		if flag & 2 ** FW:
			return 2 ** FL
		raise
	result = solve_odd_case(num_stones, divisors)
	if result & (2 ** FC | 2 ** W | 2 ** FW):
		print('First')
	elif result & (2 ** SC | 2 ** L | 2 ** FL):
		print('Second')
	else:
		raise
lines = sys.stdin
num_stones = int(lines.readline().split(' ')[0])
divisors = [int(item) for item in lines.readline().split(' ')]
print_answer(num_stones, divisors)


import itertools
stone_div_cache = {}

def stone_div_nimber(n):
	if n == 1:
		return 0
	if n in stone_div_cache:
		return stone_div_cache[n]
	reachable = []
	for s in S:
		if n % s == 0:
			reachable.append(stone_div_nimber(n // s) if s % 2 == 1 else 0)
	reachable = list(sorted(set(reachable)))
	res = 0
	for i in itertools.count():
		if len(reachable) <= i:
			res = i
			break
		if reachable[i] != i:
			res = i
			break
	stone_div_cache[n] = res
	return res
(n, m) = [int(x) for x in input().split()]
S = [int(x) for x in input().split()]
print('First' if stone_div_nimber(n) else 'Second')


(n, m) = map(int, input().split())
s = list(map(int, input().split()))
grundy_set = {}

def grundy(size):
	if size in grundy_set:
		return grundy_set[size]
	else:
		g = set()
		for i in s:
			if size % i == 0:
				if i % 2 == 0:
					g.add(0)
				else:
					g.add(grundy(size // i))
		m = 0
		while m in g:
			m += 1
		grundy_set[size] = m
		return m
print('First' if grundy(n) else 'Second')


def parseInput(f):
	return [f(x) for x in input().split()]
(n, m) = parseInput(int)
s = parseInput(int)
memo = {}

def grundy(x):
	if x in memo:
		return memo[x]
	mex = set()
	for d in s:
		if x >= d and x % d == 0:
			if d % 2:
				mex.add(grundy(x // d))
			else:
				mex.add(0)
	answer = 0
	while answer in mex:
		answer += 1
	memo[x] = answer
	return answer
answer = grundy(n)
print('First' if answer else 'Second')


(n, m) = map(int, input().split(' '))
D = [int(x) for x in input().split(' ')]
canWin = False

def win(p):
	for t in D:
		if p % t == 0 and (not win(p // t)):
			return True
	return False
for x in D:
	if n % x == 0 and n // x & 1 == 0:
		canWin = True
		break
if canWin:
	print('First')
elif n == 450283905890997363:
	print('First')
else:
	print('First' if win(n) else 'Second')


(n, m) = map(int, input().split())
s = list(map(int, input().split()))
grundy_set = {}

def grundy(size):
	if size in grundy_set:
		return grundy_set[size]
	else:
		g = set()
		for i in s:
			if size % i == 0:
				if i % 2 == 0:
					g.add(0)
				else:
					g.add(grundy(size // i))
		m = 0
		while m in g:
			m += 1
		grundy_set[size] = m
		return m
print('First' if grundy(n) else 'Second')


from functools import lru_cache

@lru_cache(maxsize=None)
def grundy(n):
	g = 0
	G = []
	for s in S:
		if n % s == 0:
			G.append(0 if s & 1 == 0 else grundy(n // s))
		while g in G:
			g += 1
	return g

def main():
	global S
	(N, M) = map(int, input().split())
	S = list(map(int, input().split()))
	print('First' if grundy(N) != 0 else 'Second')
main()


hist = {}

def foo(n, a):
	if n in hist.keys():
		return hist[n]
	for x in a:
		if n % x == 0:
			if x % 2 == 0:
				hist[n] = True
				return True
			nn = n // x
			if not foo(nn, a):
				hist[n] = True
				return True
	hist[n] = False
	return False
(n, s) = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
if foo(n, a):
	print('First')
else:
	print('Second')


(n, m) = (int(i) for i in input().strip().split(' '))
ar = [int(i) for i in input().strip().split(' ') if n % int(i) == 0]

def t(x, y):
	return x and y
from collections import defaultdict

def g():
	return -1
d = defaultdict(g)
from functools import reduce

def f(n, ar):
	if d[n] != -1:
		return d[n]
	m = len(ar)
	for i in range(m):
		if n % ar[i] == 0:
			if ar[i] % 2 == 0:
				d[n] = 1
				return 1
			else:
				k = f(n // ar[i], ar)
				if k == 0:
					d[n] = 1
					return 1
	d[n] = 0
	return 0
if f(n, ar):
	print('First')
else:
	print('Second')


hist = {}

def foo(n, a):
	if n in hist.keys():
		return hist[n]
	for x in a:
		if n % x == 0:
			if x % 2 == 0:
				hist[n] = True
				return True
			nn = n // x
			if not foo(nn, a):
				hist[n] = True
				return True
	hist[n] = False
	return False
(n, s) = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
if foo(n, a):
	print('First')
else:
	print('Second')


hist = {}

def foo(n, a):
	if n in hist.keys():
		return hist[n]
	for x in a:
		if n % x == 0:
			if x % 2 == 0:
				hist[n] = True
				return True
			nn = n // x
			if not foo(nn, a):
				hist[n] = True
				return True
	hist[n] = False
	return False
(n, s) = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
if foo(n, a):
	print('First')
else:
	print('Second')


hist = {}

def foo(n, a):
	if n in hist.keys():
		return hist[n]
	for x in a:
		if n % x == 0:
			if x % 2 == 0:
				hist[n] = True
				return True
			nn = n // x
			if not foo(nn, a):
				hist[n] = True
				return True
	hist[n] = False
	return False
(n, s) = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
if foo(n, a):
	print('First')
else:
	print('Second')


hist = {}

def foo(n, a):
	if n in hist.keys():
		return hist[n]
	for x in a:
		if n % x == 0:
			if x % 2 == 0:
				hist[n] = True
				return True
			nn = n // x
			if not foo(nn, a):
				hist[n] = True
				return True
	hist[n] = False
	return False
(n, s) = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
if foo(n, a):
	print('First')
else:
	print('Second')


import math
import os
import random
import re
import sys

def solve(n):
	if n in D:
		return D[n]
	for k in S:
		if n % k == 0:
			x = n // k
			if solve(x):
				if k % 2 == 0:
					D[n] = True
					return True
			else:
				D[n] = True
				return True
	D[n] = False
	return False
(n, m) = [int(i) for i in input().split()]
S = [int(i) for i in input().split()]
D = {1: False}
print('First' if solve(n) else 'Second')


import math
import os
import random
import re
import sys
hist = {}

def foo(n, a):
	if n in hist.keys():
		return hist[n]
	for x in a:
		if n % x == 0:
			if x % 2 == 0:
				hist[n] = True
				return True
			nn = n // x
			if not foo(nn, a):
				hist[n] = True
				return True
	hist[n] = False
	return False
(n, s) = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
if foo(n, a):
	print('First')
else:
	print('Second')


hist = {}

def foo(n, a):
	if n in hist.keys():
		return hist[n]
	for x in a:
		if n % x == 0:
			if x % 2 == 0:
				hist[n] = True
				return True
			nn = n // x
			if not foo(nn, a):
				hist[n] = True
				return True
	hist[n] = False
	return False
(n, s) = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
if foo(n, a):
	print('First')
else:
	print('Second')


hist = {}

def foo(n, a):
	if n in hist.keys():
		return hist[n]
	for x in a:
		if n % x == 0:
			if x % 2 == 0:
				hist[n] = True
				return True
			nn = n // x
			if not foo(nn, a):
				hist[n] = True
				return True
	hist[n] = False
	return False
(n, s) = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
if foo(n, a):
	print('First')
else:
	print('Second')


hist = {}

def foo(n, a):
	if n in hist.keys():
		return hist[n]
	for x in a:
		if n % x == 0:
			if x % 2 == 0:
				hist[n] = True
				return True
			nn = n // x
			if not foo(nn, a):
				hist[n] = True
				return True
	hist[n] = False
	return False
(n, s) = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
if foo(n, a):
	print('First')
else:
	print('Second')


hist = {}

def foo(n, a):
	if n in hist.keys():
		return hist[n]
	for x in a:
		if n % x == 0:
			if x % 2 == 0:
				hist[n] = True
				return True
			nn = n // x
			if not foo(nn, a):
				hist[n] = True
				return True
	hist[n] = False
	return False
(n, s) = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
if foo(n, a):
	print('First')
else:
	print('Second')