Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

# import bisect
# import copy
from fractions import gcd
# import math
# import numpy as np
# from collections import Counter, deque
from functools import reduce
# from itertools import accumulate, permutations, combinations, combinations_with_replacement, groupby, product

def resolve():
    N=int(input())
    A=list(map(int,input().split()))


    maxgcd=0
    for i in range(N):
        maxgcd=max(maxgcd,reduce(gcd,A[:i]+A[i+1:]))

    print(maxgcd)


resolve()

### FIXED CODE ###

# import bisect
# import copy
from fractions import gcd


# import math
# import numpy as np
# from collections import Counter, deque
# from functools import reduce
# from itertools import accumulate, permutations, combinations, combinations_with_replacement, groupby, product
import sys
sys.setrecursionlimit(10**9)


def resolve():
    N = int(input())
    A = list(map(int, input().split()))

    # A[0:i]の最大公約数
    L=[0]*N
    for i in range(1,N):
        L[i]=gcd(L[i - 1], A[i - 1])

    # A[i:]の最大公約数
    R=[0]*(N+1)
    for i in reversed(range(N)):
        R[i]=gcd(R[i + 1], A[i])


    maxgcd = 0
    for i in range(N):
        maxgcd = max(maxgcd, gcd(L[i], R[i + 1]))

    print(maxgcd)


resolve()
### BUGGY CODE ###

# D - String Formation

S = input()
Q = int(input())

for _ in range(Q):
    T = [t for t in input().split()]
    if T[0] == '1':
        S = S[::-1]
    else:
        if T[1] == '1':
            S = T[2] + S
        else:
            S = S + T[2]

print(S)


### FIXED CODE ###

# D - String Formation

from collections import deque

S = deque([s for s in input()])
Q = int(input())
rev = False

for _ in range(Q):
    T = [t for t in input().split()]
    t = int(T[0])
    if t == 1:
        rev = not rev
    if t == 2:
        f, c = int(T[1]), T[2]
        if f == 1:
            if rev:
                S.append(c)
            else:
                S.appendleft(c)
        if f == 2:
            if rev:
                S.appendleft(c)
            else:
                S.append(c)

S = ''.join(list(S))
print(S if not rev else S[::-1])
### BUGGY CODE ###

import collections
N=int(input())
a=[]
A=list(map(int,input().split()))
c=collections.Counter(A)
d=c.most_common()
ans=0
for i in range(len(d)):
    ans+=d[i][1]*(d[i][1]-1)//2
for i in range(N):
    for j in range(len(d)):
        if A[i]==d[j][0]:
            Ans=ans-(d[j][1]-1)
            break
    print(Ans)

### FIXED CODE ###

import collections
N=int(input())
A=list(map(int,input().split()))
c=collections.Counter(A)
ans=0
for i in c:
    ans+=c[i]*(c[i]-1)//2
for i in range(N):
    a=A[i]
    Ans=ans-c[a]+1
    print(Ans)
### BUGGY CODE ###

tmp=input().split(" ")
n = int(tmp[0])
m = int(tmp[1])

node_groups = [ i for i in range(n)]
group_nodes = [ [i] for i in range(n)]

edges = []
for i in range(m):
    tmp=input().split(" ")
    edges.append([int(tmp[0])-1, int(tmp[1])-1])

hubensa_list = [0] * (m + 1)
hubensa_list[m] = n*(n-1)//2

for i in range(m-1, 0, -1):
    edge = edges[i]
    # print("edge: ", edge)
    # print("node_groups: ", node_groups)
    node_1 = edge[0]
    node_2 = edge[1]

    node_1_group = node_groups[node_1]
    node_2_group = node_groups[node_2]

    if node_1_group == node_2_group:
        hubensa_list[i] = hubensa_list[i+1]
        continue

    group_of_node_1 = group_nodes[node_1_group]
    group_of_node_2 = group_nodes[node_2_group]
    len_1 = len(group_of_node_1)
    len_2 = len(group_of_node_2)
    group_nodes[node_2_group] = None

    group_of_node_1.extend(group_of_node_2)

    for j in group_of_node_2:
        # print("group_update: ",j, node_1_group)
        node_groups[j] = node_1_group
    
    # 不便さをだす
    hubensa_list[i] = hubensa_list[i+1] - (len_1 * len_2)

for i in range(1, m+1):
    print(hubensa_list[i])

### FIXED CODE ###

import sys

sys.setrecursionlimit(100000)

tmp=input().split(" ")
n = int(tmp[0])
m = int(tmp[1])

node_groups = [ i for i in range(n)]
group_sizes = [ 1 for _ in range(n)]

edges = []
for i in range(m):
    tmp=input().split(" ")
    edges.append([int(tmp[0])-1, int(tmp[1])-1])

hubensa_list = [0] * (m + 1)
hubensa_list[m] = n*(n-1)//2

def root(i):
    if node_groups[i] == i:
        #print(i, "is root.")
        return i
    else:
        #_1 = node_groups[i]
        node_groups[i] = root(node_groups[i])
        #_2 = node_groups[i]
        #print ("root: ", _1, _2)
        return node_groups[i]

def same(a, b):
    return root(a) == root(b)

def size(i):
    return group_sizes[root(i)]

def unite(a, b):
    a = root(a)
    b = root(b)

    if a == b:
        return
    
    group_sizes[a] += size(b)
    node_groups[b] = a


for i in range(m-1, -1, -1):
    edge = edges[i]
    # print("edge: ",edge)
    #print("node_groups: ", node_groups)
    node_1 = edge[0]
    node_2 = edge[1]

    root_1 = root(node_1)
    root_2 = root(node_2)
    if root_1 == root_2:
        hubensa_list[i] = hubensa_list[i+1]
        continue

    # 不便さをだす
    hubensa_list[i] = hubensa_list[i+1] - (size(root_1) * size(root_2))

    unite(root_1, root_2)

#print("node_groups: ", node_groups)


for i in range(1, m+1):
    print(hubensa_list[i])
### BUGGY CODE ###

import numpy as np

N=int(input())

P=np.array(input().split(" "),dtype=np.int32)

count=1


for i in range(0,N-1):
    t=min(P[0:i+1])
    if(t>=P[i+1]):
        count+=1


print(count)

### FIXED CODE ###

import numpy as np

N=int(input())

P=np.array(input().split(" "),dtype=np.int32)

count=1

t=P[0]
for i in range(0,N-1):
    if(t>=P[i+1]):
        t=P[i+1]
        count+=1


print(count)
### BUGGY CODE ###

A, B = map(int, input().split())
x = A
for i in range(B - A):
    x ^= i + A + 1
print(x)

### FIXED CODE ###

A, B = map(int, input().split())
def f(x):
    if x % 4 == 0: return x
    elif x % 4 == 1: return 1
    elif x % 4 == 2: return x ^ 1
    elif x % 4 == 3: return 0
print(f(A - 1) ^ f(B))
### BUGGY CODE ###

import sys
import bisect

if sys.platform =='ios':
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline
def INT(): return int(input())
def MAP(): return [int(s) for s in input().split()]

N, M = MAP()
A = MAP()
BC = [MAP() for _ in range(M)]

for b, c in BC:
	A.sort()
	lower = bisect.bisect_left(A, c)
	#print(lower)
	if b >= lower:
		A[:lower] = [c] * lower
	else:
		A[:b] = [c] * b

print(sum(A))

### FIXED CODE ###

import sys
from heapq import heapify, heappop
from operator import itemgetter

if sys.platform =='ios':
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline
def INT(): return int(input())
def MAP(): return [int(s) for s in input().split()]

def main():
	N, M = MAP()
	A = MAP()
	BC = [MAP() for _ in range(M)]
	
	BC.sort(key= itemgetter(1), reverse=True)
	
	heapify(A)
	
	ans = 0
	
	fin = False
	for b, c in BC:
		#print(A, b, c)
		for _ in range(b):
			a = A[0]
			if a>c:
				fin = True
				break
			else:
				heappop(A)
				ans += c
				N -= 1
				if N == 0:
					fin = True
					break
		if fin:
			break
	
	print(ans+sum(A))

if __name__ == '__main__':
	main()
### BUGGY CODE ###

a, b, x = map(int, input().split())

ans = 0

for i in range(a,b+1):
    if i % x == 0:
        ans += 1

print(ans)


### FIXED CODE ###

a, b, x = map(int, input().split())

ans = b//x - a//x

if a%x == 0:
    ans += 1

print(ans)
### BUGGY CODE ###

n,m = map(int,input().split())
ps_lst = [list(map(str,input().split())) for _ in range(m)]
ac_count = 0
wa_count = 0

pc_dic = {}
for i in range(m):
    number = ps_lst[i][0]
    tmp_dic = {number:'WA'}
    pc_dic.update(tmp_dic)

for i in range(m):
    number = ps_lst[i][0]
    answer = ps_lst[i][1]

    if answer=='AC' and pc_dic[number]=='WA':
        ac_count += 1
        tmp_dic = {number:'AC'}
        pc_dic.update(tmp_dic)
    elif answer=='WA' and pc_dic[number]=='WA':
        tmp = 0
        for j in range(m):
            if ps_lst[j][0]==number and ps_lst[j][1]=='AC':
                tmp = 1
                break
        if tmp==1:
            wa_count += 1

print('{} {}'.format(ac_count, wa_count))

### FIXED CODE ###

def main():
    n, m = map(int, input().split())
    ps_lst = [list(map(str, input().split())) for _ in range(m)]
    judge_lst = [0] * n
    penalty_lst = [0] * n
    correct = 0
    penalty = 0

    for i in range(m):
        problem = int(ps_lst[i][0]) - 1
        result = ps_lst[i][1]
        
        if judge_lst[problem] == 0:
            if result == 'AC':
                judge_lst[problem] = 1
            else:
                penalty_lst[problem] += 1

    for i in range(n):
        if judge_lst[i] == 1:
            correct += 1
            penalty += penalty_lst[i]
            
    print(correct, penalty)


if __name__ == '__main__':
    main()
### BUGGY CODE ###

n, m = list(map(int, input().split()))
results = []
if m:
    for _ in range(m):
        results.append(input().split())
ac = []
wa = {}
cnt_ac = 0
cnt_wa = 0
for res in results:
    if res[1] == "AC":
        if not res[0] in ac:
            cnt_ac += 1
            ac.append(res[0])
            if res[0] in wa.keys():
                cnt_wa += wa[res[0]]
    else:
        if res[0] in wa.keys():
            wa[res[0]] += 1
        else:
            wa[res[0]] = 1
print(cnt_ac, cnt_wa)

### FIXED CODE ###

N,M=map(int,input().split())
AC=[0]*N
WA=[0]*N
wa=0
for i in range(M):
  p,s=input().split()
  p=int(p)-1
  if AC[p]==0 and s=="AC":
  	AC[p]=1
  	wa+=WA[p]
  WA[p]+=1
print(sum(AC),wa)
### BUGGY CODE ###

#coding:utf-8

n = int(input())
s = input()

count = 0
point = 0
for i in range(point,n-2):
    si = s[i]
    for j in range(i+1,n-1):
        if s[j] != si:
            sj = s[j]
        else:
            continue
        for k in range(j+1,n):
            if s[k] != si and s[k] != sj:
                sk = s[k]
            else:
                continue
            
            if (j - i) != (k - j):
                count += 1

print("{}".format(count))

### FIXED CODE ###

#coding:utf-8

n = int(input())
s = input()

count = 0
r, g, b = 0, 0, 0

for i in s:
    if i == 'R':
        r += 1
    elif i == 'G':
        g += 1
    elif i == 'B':
        b += 1

count = r * g * b

for i in range(n-2):
    si = s[i]
    for j in range(i+1,n-1):
        sj = s[j]
        nk = 2 * j - i
        if not nk < n:
            break
        snk = s[nk]
        if {si, sj, snk} == {'R','G','B'}:
            count -= 1

print("{}".format(count))
### BUGGY CODE ###

H, W = map(int, input().split())
ch, cw = map(int, input().split())
dh, dw = map(int, input().split())
S = []
for i in range(H):
  S.append(str(input()))
  
def main(h, w, cnt):
  global H
  global W
  global S
  tmp = []
  if (h<H-1) and (S[h+1][w]=='.') and (ans[h+1][w]<0):
    ans[h+1][w] = cnt
    tmp.append([h+1, w])
  if (w<W-1) and (S[h][w+1]=='.') and (ans[h][w+1]<0):
    ans[h][w+1] = cnt
    tmp.append([h, w+1])
  if (0<h) and (S[h-1][w]=='.') and (ans[h-1][w]<0):
    ans[h-1][w] = cnt
    tmp.append([h-1, w])
  if (0<w) and (S[h][w-1]=='.') and (ans[h][w-1]<0):
    ans[h][w-1] = cnt
    tmp.append([h, w-1])
  return tmp

def sub(h, w, cnt):
  global H
  global W
  global S
  tmp = []
  for x in range(max(h-2, 0), min(h+3, H)):
    for y in range(max(w-2, 0), min(w+3, W)):
      if (S[x][y]=='.') and (ans[x][y]<0):
        ans[x][y] = cnt
        tmp.append([x, y])
  return tmp

ans = [[-1]*W for i in range(H)]
ans[ch-1][cw-1] = 0
lis = [[ch-1, cw-1]]
li = [[ch-1, cw-1]]
flag = False
for i in range(1000000):
  for j in range(1000000):
    l = []
    for n in li:
      l += main(n[0], n[1], i)
    if l == []:
      break
    elif [dh-1, dw-1] in l:
      flag = True
      break
    else:
      lis += l
      li = l
  if flag:
    break
  else:
    z = []
    for m in lis:
      z += sub(m[0], m[1], i+1)
    if z == []:
      break
    else:
      lis = z
      li = z
print(ans[dh-1][dw-1])

### FIXED CODE ###

H, W = map(int, input().split())
ch, cw = map(int, input().split())
dh, dw = map(int, input().split())
S = []
for i in range(H):
  S.append(str(input()))
  
def main(h, w, cnt):
  global H
  global W
  global S
  tmp = []
  if (h<H-1) and (S[h+1][w]=='.') and (ans[h+1][w]<0):
    ans[h+1][w] = cnt
    tmp.append([h+1, w])
  if (w<W-1) and (S[h][w+1]=='.') and (ans[h][w+1]<0):
    ans[h][w+1] = cnt
    tmp.append([h, w+1])
  if (0<h) and (S[h-1][w]=='.') and (ans[h-1][w]<0):
    ans[h-1][w] = cnt
    tmp.append([h-1, w])
  if (0<w) and (S[h][w-1]=='.') and (ans[h][w-1]<0):
    ans[h][w-1] = cnt
    tmp.append([h, w-1])
  return tmp

def sub(h, w, cnt):
  global H
  global W
  global S
  tmp = []
  for x in range(max(h-2, 0), min(h+3, H)):
    for y in range(max(w-2, 0), min(w+3, W)):
      if (S[x][y]=='.') and (ans[x][y]<0):
        ans[x][y] = cnt
        tmp.append([x, y])
  return tmp

ans = [[-1]*W for i in range(H)]
ans[ch-1][cw-1] = 0
lis = [[ch-1, cw-1]]
li = [[ch-1, cw-1]]
flag = False
for i in range(1000000):
  for j in range(1000000):
    l = []
    for n in li:
      l += main(n[0], n[1], i)
    if l == []:
      break
    elif [dh-1, dw-1] in l:
      flag = True
      break
    else:
      lis += l
      li = l
  if flag:
    break
  else:
    z = []
    for m in lis:
      z += sub(m[0], m[1], i+1)
    if z == []:
      break
    else:
      lis = z
      li = z
print(ans[dh-1][dw-1])
### BUGGY CODE ###

l,r=map(int,input().split())
ans=2018
for i in range(l,r):
    for j in range(i+1,r+1):
        a = (i*j) % 2019
        ans = min(ans,a)
        #print(i,j,ans)
print(ans)



### FIXED CODE ###

l,r=map(int,input().split())
ans=2018
for i in range(l,min(r,l+2019)):
    for j in range(i+1,min(r+1,i+2019)):
        a = (i*j) % 2019
        ans = min(ans,a)
        #print(i,j,ans)
print(ans)
### BUGGY CODE ###

from collections import deque
from heapq import heappush, heappop

N, X, Y = [int(i) for i in input().split()]
X -= 1
Y -= 1
G = [[] for _ in range(N)]
for i in range(N):
    if i!=0: G[i].append((i-1, 1))
    if i!=N-1: G[i].append((i+1, 1))
G[X].append((Y, 1))
G[Y].append((X, 1))

INF = 10**30
def Johnson(G, N):
    h = [0]*N

    update = 1
    for i in range(N):
        update = 0
        for v in range(N):
            d = h[v]
            for w, c in G[v]:
                if c + d < h[w]:
                    h[w] = d + c
                    update = 1
        if not update:
            break
    else:
        return None

    for v in range(N):
        d = h[v]
        g = G[v]
        for j, (w, c) in enumerate(g):
            g[j] = (w, c + d - h[w])

    D = []
    for i in range(N):
        dst = [INF]*N
        dst[i] = 0
        que = [(0, i)]
        while que:
            cost, v = heappop(que)
            if dst[v] < cost:
                continue
            for w, c in G[v]:
                if cost + c < dst[w]:
                    dst[w] = r = cost + c
                    heappush(que, (r, w))
        v = h[i]
        for j in range(N):
            if dst[j] == INF:
                dst[j] = INF
            else:
                dst[j] -= v - h[j]
        D.append(dst)

    return D
res = [0]*(N+2)
D = Johnson(G, N)
for i in range(N):
    for j in range(i+1, N):
        res[D[i][j]] += 1

for i in range(1, N):
    print(res[i])

### FIXED CODE ###

from collections import deque
N, X, Y = [int(i) for i in input().split()]
X -= 1
Y -= 1
G = [[] for _ in range(N)]
for i in range(N):
    if i!=0: G[i].append(i-1)
    if i!=N-1: G[i].append(i+1)
G[X].append(Y)
G[Y].append(X)


def bfs(G, N, s):
    dist = [-1]*N
    que = deque([s])
    dist[s] = 0
    while que:
        v = que.popleft()
        d = dist[v]
        for w in G[v]:
            if dist[w] > -1:
                continue
            dist[w] = d + 1
            que.append(w)
    return dist

res = [0]*(N+1)
for i in range(N):
    d = bfs(G, N, i)
    for j in range(i+1, N):
        res[d[j]] += 1

for i in range(1, N):
    print(res[i])
### BUGGY CODE ###


from collections import Counter

#####

def getIntList(inp):
	return [int(_) for _ in inp]


from sys import stdin
import sys
sys.setrecursionlimit(10**8)

def getInputs():
	inputs=[]
	for line in stdin:
		line=line.split()
		inputs.append(line)
	return inputs


def main(inputs):
	n=int(inputs[0][0])
	aa=getIntList(inputs[1])
	
	count0=Counter(aa)
	
# 	print(n)
# 	print(aa)
# 	print(count0)
	
	ans={}
	for k in range(n):
		targetA=aa[k]
		if targetA in ans:
			print(ans[targetA])
			continue
		
		count=count0.copy()
		count[targetA]-=1
		n=0
		for ai,c in count.items():
			n+=c*(c-1)//2
		ans[targetA]=n
		print(n)
		
	

if __name__=="__main__":
	inputs=getInputs()
# 	inputs=simInputs()
	main(inputs)



### FIXED CODE ###



#####

import numpy as np
# from numpy import int64, int8
from collections import Counter

#####

def getIntList(inp):
	return [int(_) for _ in inp]


from sys import stdin
# import sys
# sys.setrecursionlimit(10**8)

def getInputs():
	inputs=[]
	for line in stdin:
		line=line.split()
		inputs.append(line)
	return inputs


def unique(x):
	count=Counter()
	for xi in x:
		count[xi]+=1
	u,c=zip(*count.items())
	return u,c



def main(inputs):
	n=int(inputs[0][0])
	aa=getIntList(inputs[1])

# 	n=200000
# 	aa=np.random.randint(1,n+1,n)
	
# 	print("start")
# 	aa=np.array(aa)
# 	aUnique, count=np.unique(aa, return_counts=True)

	aUnique, count=unique(aa)
	aUnique=np.array(aUnique, np.int64)
	count=np.array(count, np.int64)
	
# 	print(n)
# 	print("aa",aa)
# 	print("aUnique",aUnique)
# 	print("count  ",count)
	
# 	countUnique,countCount=np.unique(count, return_counts=True)
	countUnique,countCount=unique(count)
	countCount=np.array(countCount, np.int64)
	
	pat={}
	countAns=np.empty(len(countUnique), np.int64)
	countAns1=np.empty(len(countUnique), np.int64)
	for ci,c in enumerate(countUnique):
		if c not in pat:
			ni=c*(c-1)//2
			pat[c]=ni
		countAns[ci]=pat[c]
		
		c-=1
		if c not in pat:
			ni=c*(c-1)//2
			pat[c]=ni
		countAns1[ci]=pat[c]
	
# 	print("countUnique",countUnique)
# 	print("countCount ",countCount)
# 	print("countAns ",countAns)
# 	print("countAns1",countAns1)
	
	countUniqueIndex=dict([(c,i) for i,c in enumerate(countUnique)])
# 	print("countUniqueIndex", countUniqueIndex)
	
# 	uniNums=np.empty(len(aUnique), np.int64)
	nums=np.empty(n, np.int64)
	ans={}
	for cui,cu in enumerate(countUnique):
		countCount[cui]-=1
		num0=(countAns*countCount).sum()
		countCount[cui]+=1
		num1=countAns1[cui]
		num=num0+num1
# 		print(cu,num)
		countMask=count==cu
# 		uniNums[countMask]=num
		targetA=aUnique[countMask]
# 		print(targetA)
		for a in targetA:
			ans[a]=num
# 		print(targetA[None,:])
# 		print(aa[:,None])
# 		aMask=(aa[:,None]==targetA[None,:]).any(axis=1)
# 		print(aMask)

# 		nums[aMask]=num
# 	print("\n".join(map(str,nums)))

	for a in aa:
		print(ans[a])
	

if __name__=="__main__":
	inputs=getInputs()
# 	inputs=simInputs()
	main(inputs)
### BUGGY CODE ###

import sys

input = sys.stdin.readline

input_tmp = [int(input()) for _ in range(6)]

n = input_tmp[0]

a2e=input_tmp[1:]

min_value = min(a2e)

tmp = n
while True:
    if tmp % min_value == 0:
        break
    else:
        tmp += 1

print(tmp // min_value - 1 + 5)


### FIXED CODE ###

import sys

input = sys.stdin.readline

input_tmp = [int(input()) for _ in range(6)]

n = input_tmp[0]

a2e = input_tmp[1:]

min_value = min(a2e)

if n <= min_value:
    print(5)
else:
    if n % min_value != 0:
        print(n // min_value + 5)
    else:
        print(n // min_value - 1 + 5)
### BUGGY CODE ###

n,p = tuple(map(int,input().split()))
s = input()
modulo = [0]*p
modulo[0] = 1
if p!= 2 and p != 5:
    for i in range(n):
        modulo[int(s[i:]) % p] += 1

    ans = 0
    for i in modulo:
        ans += (i * (i-1)) // 2

    print(ans)
else:
    ans = 0
    for i in range(n):
        if int(s[i]) % p == 0:
            ans += i+1
    print(ans)


### FIXED CODE ###

n,p = tuple(map(int,input().split()))
s = input()
modlist = [0]*p
modlist[0] = 1
if p!= 2 and p != 5:
    mod = 0
    pwrmod = 1
    for i in s[::-1]:
        mod = (mod + pwrmod * int(i)) % p
        pwrmod = (pwrmod * 10) % p
        modlist[mod] += 1
    ans = 0
    for i in modlist:
        ans += (i * (i-1)) // 2

    print(ans)
else:
    ans = 0
    for i in range(n):
        if int(s[i]) % p == 0:
            ans += i+1
    print(ans)
### BUGGY CODE ###

n = int(input())
a = []
for _ in range(n):
    a.append([int(i) - 1 for i in input().split()])

day = 0
ind = [0] * n
while True:
    day += 1
    used = [0] * n
    for i in range(n):
        if ind[i] < n-1 and ind[a[i][ind[i]]] < n-1 and not used[i] and not used[a[i][ind[i]]] and a[a[i][ind[i]]][ind[a[i][ind[i]]]] == i:
            used[i] = 1
            used[a[i][ind[i]]] = 1
            ind[a[i][ind[i]]] += 1
            ind[i] += 1
    if sum(ind) == n*(n-1):
        print(day)
        break
    if sum(used) == 0:
        print(-1)
        break


### FIXED CODE ###

n = int(input())
e = [[] for _ in range(n * n)]
co = [0] * (n * n)
for i in range(n):
    a = [int(i)-1 for i in input().split()]
    for j in range(n - 2):
        aa, bb = min(i, a[j]), max(i, a[j])
        cc, dd = min(i, a[j+1]), max(i, a[j+1])
        e[aa * n + bb].append(cc * n + dd)
        co[cc * n + dd] += 1

x = []
for i in range(n * n):
    if co[i] == 0:
        x.append(i)

ans = 0
while x:
    y = []
    for i in x:
        for j in e[i]:
            co[j] -= 1
            if co[j] == 0:
                y.append(j)
    x = y
    ans += 1
if max(co) > 0:
    print(-1)
else:
    print(ans)
### BUGGY CODE ###

# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def ceil(a, b=1): return int(-(-a // b))
def round(x): return int((x*2+1) // 2)
def fermat(x, y, MOD): return x * pow(y, MOD-2, MOD) % MOD
def lcm(x, y): return (x * y) // gcd(x, y)
def lcm_list(nums): return reduce(lcm, nums, 1)
def gcd_list(nums): return reduce(gcd, nums, nums[0])
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N, K = MAP()
aN = LIST()

# メモ[山の残数] = 今の手番がこの局面から勝てるか
memo = [None] * (K+1)

def dfs(k):
    # 既に見た局面ならメモの内容を返す
    if memo[k] is not None:
        return memo[k]
    for i in range(N):
        # 山の残数より多くは取れない
        if k-aN[i] < 0:
            break
        # 1つでも負けを押し付ける手があれば勝てる
        if not dfs(k-aN[i]):
            memo[k] = True
            return True
    # 負けを押し付ける手がなかったので自分が負ける
    memo[k] = False
    return False

if dfs(K):
    print('First')
else:
    print('Second')


### FIXED CODE ###

# -*- coding: utf-8 -*-

"""
参考：https://kyopro-friends.hatenablog.com/entry/2019/01/12/231000
・ゲームDP
・負け状態を押し付けられるかどうか
"""

import sys, re
from collections import deque, defaultdict, Counter
from math import sqrt, hypot, factorial, pi, sin, cos, radians
if sys.version_info.minor >= 5: from math import gcd
else: from fractions import gcd 
from heapq import heappop, heappush, heapify, heappushpop
from bisect import bisect_left, bisect_right
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from functools import reduce, partial
from fractions import Fraction
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def ceil(a, b=1): return int(-(-a // b))
def round(x): return int((x*2+1) // 2)
def fermat(x, y, MOD): return x * pow(y, MOD-2, MOD) % MOD
def lcm(x, y): return (x * y) // gcd(x, y)
def lcm_list(nums): return reduce(lcm, nums, 1)
def gcd_list(nums): return reduce(gcd, nums, nums[0])
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N, K = MAP()
aN = LIST()

# メモ[山の残数] = 今の手番が勝てるか
dp = [False] * (K+1)
# 残数0は負け確定
dp[0] = False

for i in range(1, K+1):
    for j in range(N):
        # j枚取った時、負け状態に出来るなら、それを取ればいいので今の手番は勝てる
        if i-aN[j] >= 0 and dp[i-aN[j]] == 0:
            dp[i] = True
            break
if dp[K]:
    print('First')
else:
    print('Second')