Harryxun/stf_run huggingface dataset:
N, M = map(int, input().split())
a, b = [], []
for _ in range(N):
    A, B = map(int, input().split())
    a.append(A)
    b.append(B)
    
c, d = [], []
for _ in range(N):
    C, D = map(int, input().split())
    c.append(C)
    d.append(D)
    
for A, B in zip(a, b):
    ans = 0
    mn = 10**9
    for i, (C, D) in enumerate(zip(c, d)):
        s = abs(A - C) + abs(B - D)
        if mn > s:
            ans = i
            mn = s
            
    print(ans+1)

### FIXED CODE ###

N, M = map(int, input().split())
a, b = [], []
for _ in range(N):
    A, B = map(int, input().split())
    a.append(A)
    b.append(B)
    
c, d = [], []
for _ in range(M):
    C, D = map(int, input().split())
    c.append(C)
    d.append(D)
    
for A, B in zip(a, b):
    ans = 0
    mn = 10**9
    for i, (C, D) in enumerate(zip(c, d)):
        s = abs(A - C) + abs(B - D)
        if mn > s:
            ans = i
            mn = s
            
    print(ans+1)
# from collections import deque
    k = int(input())
    a = list(map(int, input().split()))
    now = [2]
    if k == 1:
        print("2 3") if a[0] == 2 else print(-1)
    else:
        for i in reversed(range(1,k)):
            nxt = []
            for j in range(len(now)):
                test = now[j]
                nxtd = a[i-1]
                if test % a[i] == 0:
                    mod = test % nxtd
                    if (nxtd-mod)%nxtd < a[i]:
                        for k in range((nxtd-mod)%nxtd, a[i], nxtd):
                            nxt.append(k+test)
            if not nxt:
                print(-1)
                exit()
            now = nxt
        ans = []
        for i in now:
            test = i
            if test % a[0] == 0:
                ans.append(i)
                ans.append(i+a[0]-1)
        ans = sorted(ans)
        print("{} {}".format(ans[0], ans[-1]))
resolve()

### FIXED CODE ###

def resolve():
    # from collections import deque
    k = int(input())
    a = list(map(int, input().split()))
    rl = [2, 2]
    ra = a[::-1]

    for i in range(k):
        nxt = []
        nowa = ra[i]
        if (rl[-1] // nowa) - ((rl[0]-1)//nowa) > 0:
            nxt.append((((rl[0]-1)//nowa)+1)*nowa)
            nxt.append((rl[-1]//nowa)*nowa + nowa-1)
        if not nxt:
            print(-1)
            exit()
        rl = nxt

    print("{} {}".format(rl[0], rl[-1]))
resolve()
n,k = map(int, input().split())
a = list(map(int, input(),split()))
ans = 0
for i in range(len(a):
    if a[i] >= k:
        ans += 1
print(ans)

### FIXED CODE ###

n,k = map(int, input().split())
a = list(map(int, input().split()))
ans = 0
for i in range(len(a)):
    if a[i] >= k:
        ans += 1
print(ans)
nums = input().split()
a = int(nums[0])
b = int(nums[1])
c = int(nums[2])
if a < b < c:
    print('Yes')
else
    print('No')

### FIXED CODE ###

nums = input().split()
a = int(nums[0])
b = int(nums[1])
c = int(nums[2])
if a < b < c:
    print('Yes')
else:
    print('No')
from math import sqrt

while True:
    n = int(input())
    if n == 0: break
    nums = [ x for x in range(n, 2*n+1) if x % 2 == 1 or x == 2]
    for i in range(2,int(sqrt(2*n))):
        nums = [x for x in nums if x % i != 0 or x == i]
    print(len(nums))

### FIXED CODE ###

from math import sqrt

size = 123456
primes = [x for x in range(2, 2*size+1) if x == 2 or x % 2 == 1]
for i in range(2, int(sqrt(2*size))):
    primes = [x for x in primes if x % i != 0 or x == i]

while True:
    n = int(input())
    if n == 0: break
    nums = [x for x in primes if x > n and x <= 2*n]
    print(len(nums))
import sys
for s in sys.stdin.readlines():
    n = s.zfill(5)
    for i in xrange(2):
        print "".join(["*" if int(n[j])-5*i in range(5) else " " for j in xrange(5)])
    print "="*5
    for i in xrange(5):
        print "".join([" " if (int(n[j])%5)==i else "*" for j in xrange(5)])

### FIXED CODE ###

import sys
c = False
for s in sys.stdin.readlines():
    n = s.strip().zfill(5)
    if c: print
    c = True
    for i in xrange(2):
        print "".join(["*" if int(n[j])-5*i in range(5) else " " for j in xrange(5)])
    print "="*5
    for i in xrange(5):
        print "".join([" " if (int(n[j])%5)==i else "*" for j in xrange(5)])
N=int(input())
A=map(input().split())
print(len(set(A)))

### FIXED CODE ###

N=int(input())
A=set(input() for i in range(N))
print(len(A))
a,b=map(int,input().stlip())

x=''

for i in range(a):
  x += str(b)
  
y=''

for i in range(b):
  y += str(a)
  
print(min(x,y))
 


### FIXED CODE ###

a, b = map(int, input().split())
if a <= b:
    print(str(a) * b)
else:
    print(a * str(b))
S, W = map(int, input().split())
    if S >= W:
        print('safe')
    else:
      S < W:
      print('unsafe')

### FIXED CODE ###

s,w=map(int,input().split())
if s>w:
    print('safe')
else :
    print('unsafe')
import sys
input = sys.stdin.readline

def main():
    a,b,n = map(int,input().split())
    l = gcd(a,b)
    print(a*min(n,(b-1))//b-a*(min(b-1,n)//b))

if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys
input = sys.stdin.readline

def main():
    a,b,n = map(int,input().split())
    print(a*min(n,(b-1))//b-a*(min(b-1,n)//b))

if __name__ == "__main__":
    main()
n = int(input())
a = list(map(int, input().split()))

li = []
cnt = 0
c = a[0]

for i in range(1,n):
	# print(c)
	if c >= a[i]:
		cnt += 1
		c = a[i]
	else:
		li.append(cnt)
		c = a[i]
		cnt = 0
	
	if i == n-1:
		li.append(cnt)

print(max(li))

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))

li = []
cnt = 0
c = a[0]
if n >= 2:
	for i in range(1,n):
		# print(c)
		if c >= a[i]:
			cnt += 1
			c = a[i]
		else:
			li.append(cnt)
			c = a[i]
			cnt = 0
		
		if i == n-1:
			li.append(cnt)
else:
	li.append(0)



print(max(li))
password = list(input())
for i in range(len(password)):
  for j in range(i+1, len(password)):
    if i != j and password[i] == password[j]:
      print("Bad")
      exit(1)
print("Good")


### FIXED CODE ###

password = list(input())
if password[0] == password[1] or password[1] == password[2] or password[2] == password[3]:
  print("Bad")
else:
  print("Good")
x=int(input())
if x==3 or x==5 or x==7:
	print("YES:)
else:
	print("NO")

### FIXED CODE ###

x=int(input())
if x==3 or x==5 or x==7:
	print("YES")
else:
	print("NO")
class UnionFind:
    def __init__(self, n):
        self.p = [i for i in range(n)]
        self.components = n  # 連結成分の数

    def root(self, x):
        if self.p[x] == x:
            return x
        else:
            self.p[x] = self.root(self.p[x])
            return self.p[x]
    
    def unite(self, x, y):
        x, y = self.root(x), self.root(y)
        if x != y:
            self.p[x] = y
            self.components -= 1
    
    def same(self, x,y):
        return (self.root(x) == self.root(y))

N = int(input())
X, Y = [], []
for i in range(N):
    x, y = map(int,input().split())
    X.append([x,i])
    Y.append([y,i])

X.sort()
Y.sort()

edges = []
for i in range(N-1):
    edges.append([X[i+1][0]-X[i][0], X[i][1], X[i+1][1]])
    edges.append([Y[i+1][0]-Y[i][0], Y[i][1], Y[i+1][1]])
edges.sort()

UF = UnionFind(N)
ans = 0
for cost, s, t in edges:
    if UF.same(s,t): continue

    UF.unite(s,t)
    ans += cost
print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**5)

class UnionFind:
    def __init__(self, n):
        self.p = [i for i in range(n)]
        self.components = n  # 連結成分の数

    def root(self, x):
        if self.p[x] == x:
            return x
        else:
            self.p[x] = self.root(self.p[x])
            return self.p[x]
    
    def unite(self, x, y):
        x, y = self.root(x), self.root(y)
        if x != y:
            self.p[x] = y
            self.components -= 1
    
    def same(self, x,y):
        return (self.root(x) == self.root(y))

N = int(input())
X, Y = [], []
for i in range(N):
    x, y = map(int,input().split())
    X.append([x, i])
    Y.append([y, i])

X.sort()
Y.sort()

edges = []
for i in range(N-1):
    edges.append([X[i+1][0]-X[i][0], X[i][1], X[i+1][1]])
    edges.append([Y[i+1][0]-Y[i][0], Y[i][1], Y[i+1][1]])
edges.sort()

UF = UnionFind(N)
ans = 0
for cost, s, t in edges:
    if UF.same(s,t): continue

    UF.unite(s,t)
    ans += cost
print(ans)
from operator import itemgetter

class graph:
    def __init__(self,n):
        self.n = n
        self.con = []
        self.team = -1

    def connect(self,n,dist):
        self.con.append((n,dist))

    def is_edge(self):
        if(len(self.con)==1):
            return True
        else: return False

    def set_team(self,team):
        self.team = team

N = int(input())
uvw = [[int(x) for x in input().split()]for _ in range(N-1)]
li = []
edge = -1
for i in range(1,N+1):
    li.append(graph(i))
for i in uvw:
    li[i[0]-1].connect(i[1],i[2])
    li[i[1]-1].connect(i[0],i[2])
for i in li:
    if(i.is_edge()):
        edge=i.n
        break
before = edge
next = edge
li[edge-1].set_team(0)
for i in range(N):
    print(li[next-1].team)
    if(i==N-1):break
    if(li[next-1].con[0][0]==before):
        before = next
        next = li[next-1].con[1][0]
        li[next-1].set_team((li[before-1].team+li[before-1].con[1][1])%2)
    else:
        before = next
        next = next = li[next-1].con[0][0]
        li[next-1].set_team((li[before-1].team+li[before-1].con[0][1])%2)


### FIXED CODE ###

from operator import itemgetter
import sys
sys.setrecursionlimit(1000000)

def dfs(n,team):
    li[n-1] = team
    for i in grp[n-1]:
        if(li[i[0]-1]==-1):
            dfs(i[0],(team+i[1])%2)



N = int(input())
li = [-1]*N
uvw = [[int(x) for x in input().split()]for _ in range(N-1)]
uvw.sort(key=itemgetter(0))
grp = [[]for _ in range(N)]
for i in uvw:
    grp[i[0]-1].append([i[1],i[2]])
    grp[i[1]-1].append([i[0],i[2]])
dfs(1,0)
for i in li:
    print(i)
# coding: utf-8
# Your code here!
#########行列読み込み ##############################################
"""
from sys import stdin
n = int(stdin.readline().rstrip())
data = [stdin.readline().rstrip().split() for _ in range(n)]
print(data)
print(*data, sep='\n')
"""
##################################################################
#########入力系####################################################
"""
s =input()
s=list(input())
a=int(input())
x,y = map(int,input().split())	
li = input().split()	
li = list(map(int,input().split()))	
li = input().split('T')	
"""
##################################################################
import numpy as np
l ={}
N,K = map(int,input().split())
#P = list(map(int,input().split()))
P = np.asarray(list(map(int,input().split())))
#print(P)
P_ = []
#print(P_)

def kitai(num):
    x = 0
    for j in range(num):
        x += num-j
    return x/num
for i in P:
    P_.appendkitai(i)
#print(type(P_))


#print(P)
for i in range(0,N-K+1):
    #print(P[i:i+K])
    l[sum(P_[i:i+K])]=i
#print(l)
max = max(l.keys())
print(max)
import sys
def input():
    return sys.stdin.readline()[:-1]







### FIXED CODE ###

#########行列読み込み ##############################################
"""
from sys import stdin
n = int(stdin.readline().rstrip())
data = [stdin.readline().rstrip().split() for _ in range(n)]
print(data)
print(*data, sep='\n')
"""
##################################################################
#########入力系####################################################
"""
s =input()
s=list(input())
a=int(input())
x,y = map(int,input().split())	
li = input().split()	
li = list(map(int,input().split()))	
li = input().split('T')	
"""
##################################################################

N,K = map(int,input().split())
def kitai(num):
    return (1+int(num))/2
P = list(map(kitai,input().split()))	  

S = [0]*(N+1)
ans = 0
for i in range(N):
    S[i+1]=S[i]+P[i]
for i in range(N-K+1):
    ans = max(ans,S[i+K]-S[i])
print(ans)
MOD = 10**9 + 7
def main():
  N, K = map(int , input().split())
  A = list(map(int, input().split()))
  flag = True
  for i in A:
    if i >= 0:
      flag = False
      break
  if flag and K % 2 == 1:
    A.sort(reverse = True)
    ans = 1
    for i in range(K):
      ans = ans*A[i]%MOD
    print(ans)
  elif K == N:
    ans = 1
    for i in A:
      ans = ans*i%MOD
    print(ans)
  else:
    A_abs = []
    for i in A:
      A_abs.append([abs(i), i < 0])
    A_abs.sort(reverse = True, key =  lambda x: x[0])
    num = 0
    ans = 1
    posi = 0
    sign = 0
    while (num < K):
      ans =  ans * A_abs[posi][0] % MOD
      if A_abs[posi][1]:sign+=1
      num += 1
      if num == K and sign % 2 == 1:
        ans = ans * pow(A_abs[posi][0], MOD-2, MOD)%MOD
        num -= 1
        sign -= 1
      posi += 1
    print(ans)
          
    
if __name__ == "__main__":
  main()    

### FIXED CODE ###

MOD = 10**9 + 7
def main():
  N, K = map(int , input().split())
  A = list(map(int, input().split()))
  
  if max(A) < 0 and K % 2 == 1:
    A.sort(reverse = True)
    ans = 1
    for i in range(K):
      ans = ans*A[i]%MOD
    print(ans%MOD)
  elif K == N:
    ans = 1
    for i in A:
      ans = ans*i%MOD
    print(ans%MOD)
  else:
    A_p = []
    A_m = []
    for i in A:
      if i >= 0:A_p.append(i)
      else:A_m.append(abs(i))
    A_p.sort(reverse =  True)
    A_m.sort(reverse = True)
    num = 0
    ans = 1
    posi_p = 0
    posi_m = 0
    sign = 0
    while (num < K):
      if posi_m == len(A_m) and posi_p < len(A_p):
        ans = ans*A_p[posi_p]%MOD
        posi_p += 1
        num += 1
      elif posi_p == len(A_p) and posi_m < len(A_m):
        ans = ans*A_m[posi_m]%MOD
        sign += 1
        posi_m += 1
        num += 1        
      elif  A_p[posi_p] >= abs(A_m[posi_m]):
        ans = ans*A_p[posi_p]%MOD
        posi_p += 1
        num += 1        
      else:
        ans = ans*A_m[posi_m]%MOD
        sign += 1
        posi_m += 1
        num += 1
      if num == K and sign % 2 == 1:
        if K == 1:
          ans = A_p[0]
        elif posi_m == len(A_m):
          ans = ans*pow(A_m[posi_m-1], MOD-2, MOD) % MOD
          ans = ans*A_p[posi_p] % MOD
        elif posi_p == len(A_p):
          ans = ans*pow(A_p[posi_p-1],  MOD-2, MOD)
          ans =  ans*A_m[posi_m] % MOD
        elif A_p[posi_p]*A_p[posi_p-1] >= A_m[posi_m]*A_m[posi_m-1]:
          ans = ans*pow(A_m[posi_m-1], MOD-2, MOD)%MOD
          ans = ans*A_p[posi_p] % MOD
        else:
          if posi_p != 0:
            ans = ans*pow(A_p[posi_p-1], MOD-2, MOD)%MOD
            ans = ans*A_m[posi_m]%MOD
          else:
            ans = ans*pow(A_m[posi_m-1], MOD-2, MOD)%MOD
            ans = ans *A_p[posi_p]%MOD
            
    print(ans%MOD)
          
    
if __name__ == "__main__":
  main()
x=input.split()
for i in range(5):
  if x[i]=='0': print(str(i+1))

### FIXED CODE ###

x=input().split()
for i in range(5):
  if x[i]=='0': print(str(i+1))
n, m = map(int, input().split())
a = [int(input()) for _ in range(m)]

dp = [-1 for _ in range(n + 1)]

def checker(s, g):
    if s > g:
        return 0
    elif s == g:
        return 1
    else:
        if dp[g - s] != -1:
            return dp[g - s]
        else:
            ret = checker(s + 1, g) + checker(s + 2, g)
            dp[g - s] = ret
            return ret

if m == 0:
    c = checker(0, n)
else:
    s = 0
    g = a[0] - 1
    if g - s > 0:
        c = checker(s, g)
    else:
        c = 1
    if m == 1:
        s = a[0] + 1
        g = n
    else:
        for i in range(1, m):
            if a[i - 1] + 1 == a[i]:
                c = 0
                break
            else:
                s = a[i - 1] + 1
                g = a[i] - 1
                if g - s > 0:
                    c *= checker(s, g)
                s = a[m - 1] + 1
                g = n
    if g - s > 0:
        c *= checker(s, g)

print(c % 1000000007)


### FIXED CODE ###

n, m = map(int, input().split())
a = [True for _ in range(n + 1)]
for _ in range(m):
    a[int(input())] = False

dp = [0] * (n + 1)
dp[0] = 1

for now in range(n):
    for next in range(now + 1, min(n + 1, now + 3)):
        if a[next]:
            dp[next] += dp[now]
            dp[next] %= 1000000007

print(dp[n])
N, M = map(int, input().split())

a = [int(input()) for i in range(M)]



dp = [0] * (N + 1)


if 1 in a and 2 in a:
    print(0)
    exit()

if 1 in a:
    dp[1] = 0
    dp[2] = 1
elif 2 in a:
    dp[1] = 1
    dp[2] = 0
else:
    dp[1] = 1
    dp[2] = 2

for i in range(3,N+1):
    if i in a:
        dp[i] = 0
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007

print(dp[N])

### FIXED CODE ###

N, M = map(int, input().split())

a = [int(input()) for i in range(M)]


for i in range(M - 1):
    if a[i] + 1 == a[i+1]:
        print(0)
        exit()

dp = [0] * (N + 1)
flag_a = [0] * (N + 1)

for i in range(M):
    flag_a[a[i]] = -1


if N == 1 and M != 1:
    print(1)
    exit()
elif N == 1 and M == 1:
    print(0)
    exit()

if 1 in a and 2 in a:
    print(0)
    exit()

if 1 in a:
    dp[1] = 0
    dp[2] = 1
elif 2 in a:
    dp[1] = 1
    dp[2] = 0
else:
    dp[1] = 1
    dp[2] = 2

for i in range(3,N+1):
    if flag_a[i] == -1:
        dp[i] = 0
    else:
        dp[i] = (dp[i - 1] + dp[i - 2]) % 1000000007

print(dp[N])
N,M = map(int,input().split())
i=1
for(i in range(N)):
    He=N*i
    if(H<He):
      break
    else:
      continue
print(i)

### FIXED CODE ###

h, a = map(int, input().split())

i = 0

while h > 0:
    h = h - a
    i += 1

print(i)
#3つの数字をリストにする
data = input().split( )
#場合わけ
if (data[0] == data[1] or data[1] == data[2] or
   data[2] ==data[0]) and data[1]!= data[2]!=data[3] :
    print("Yes")

else:
    print("No")

### FIXED CODE ###

#3つの数字をリストにする
data = input().split( )
#場合わけ
if (data[0] == data[1] or data[1] == data[2] or
   data[2] ==data[0]) and not data[1]== data[2]==data[0] :
    print("Yes")

else:
    print("No")
a,b,c.d=(int(input()) for i in range(4))
ans=min(a,b)+min(c,d)
print(ans)

### FIXED CODE ###

a,b,c,d=(int(input()) for i in range(4))
ans=min(a,b)+min(c,d)
print(ans)
k=int(input())

l=[]
for i in range(1,k+1):
  x=7%k
  num=(x*10+7)%k
  x=num
  l.append(num)
  if num==0:
  	print(i)
    break
if 0 not in l:
  print(-1)

### FIXED CODE ###

import sys
k=int(input())
l=[]
x=7%k
if x == 0:
  print(1)
  sys.exit()
for i in range(2,k+1):
  num=(x*10+7)%k
  x=num
  l.append(num)
  if num==0:
    print(i)
    break
if 0 not in l:
  print(-1)
n, a = list(map(int, input().split()))
if n % 500 <= a:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

n = int(input())
a = int(input())

if n % 500 <= a:
  print('Yes')
else:
  print('No')
import sys
input = sys.stdin.readline
N, K = map(int,input().split())
H = list(map(int,input().split()))
DP = [0]*(N+1)
for _ in range(2,N+1):
  Hi = H[i-1]
  DP[i] = min( [DP[j] + abs(Hi - H[j-1]) for j in range(max(1,i-K),i)])
print(DP[-1])

### FIXED CODE ###

N, K = map(int,input().split())
H = list(map(int,input().split()))
import numpy as np
dp = np.zeros(N,dtype=np.int)
harr = np.array(H)
for i in range(1,N):
  St = max(0,i-K)
  Hi = harr[i]
  dp[i] = min(dp[max(0,i-K):i] + np.abs(Hi - harr[max(0,i-K):i]))
print(dp[-1])
N,K=(map(int,input().split()))
a=[i for i in range(1,N+1)]
d=[]
A=[]
b=[]
count=0
for i in (0,K):
    d.append(int(input()))
    A.append(list(map(int,input().split())))
for i in range(1,len(d)+1):
        if i in d:
            x=d.index(i)
            y=A[i-1]
            for j in range(0,len(y)):
                z=y[j]
                b.append(z)
b1=list(dict.fromkeys(b))
for i in b1:
    if i in a:
        count+=1
print(N-count)

### FIXED CODE ###

N,K=(map(int,input().split()))
a=[i for i in range(1,N+1)]
d=[]
A=[]
b=[]
count=0
for i in range(K):
    d.append(int(input()))
    A.append(list(map(int,input().split())))
for i in A:
    for j in i:
        b.append(j)
b1=list(dict.fromkeys(b))
for i in b1:
    if i in a:
        count+=1
print(N-count)
a=0
b=0
list = input()
a = list[0]
b = list[2]
print(a*b,2*(a+b))

### FIXED CODE ###

ab = input()
num_ab = ab.split()
a = int(num_ab[0])
b = int(num_ab[1])
print(a*b,2*(a+b))
t,x=map(int,input().split()
print(t/x)


### FIXED CODE ###

t,x=map(int,input().split())
print(t/x)
N = input()
print(3 * N**2)

### FIXED CODE ###

N = int(input())
print(3 * N**2)
S = input()
S = list(S)

ans = 1
pre = S[0]
c = 1

while 1:
    if c == len(S)-1:
        if S[c] == pre:
            break
        else:
            ans += 1
            break

    if S[c] == pre:
        pre = S[c]+S[c+1]
        ans += 1
        c += 2
    else:
        pre = S[c]
        ans += 1
        c += 1

print(ans)


### FIXED CODE ###

S = input()
S = list(S)

ans = 1
pre = S[0]
c = 1
while 1:
    if c == len(S):
        break
    if c == len(S)-1:
        if S[c] == pre:
            break
        else:
            ans += 1
            break

    if S[c] == pre:
        pre = S[c]+S[c+1]
        ans += 1
        c += 2
    else:
        pre = S[c]
        ans += 1
        c += 1

print(ans)
import sys
input = sys.stdin.readline

n = int(input())
a = [int(x) for x in input().split()]
maxval = 10 ** 6
has_prime_factor = [0] * (maxval+1)
has_prime_factor[0] = 2
has_prime_factor[1] = 2
for i in range(n+1):
    if a[i] == 1:
        continue
    if has_prime_factor[a[i]] > 1:
        continue
    for k in range(a[i], maxval+1, a[i]):
        has_prime_factor[k] += 1

result = sum(has_prime_factor[v] <= 1 for v in a)
print(result)

### FIXED CODE ###

import sys
input = sys.stdin.readline

n = int(input())
a = [int(x) for x in input().split()]
maxval = 10 ** 6
factor_cnt = [0] * (maxval+1)
factor_cnt[0] = 2
for i in range(n):
    if factor_cnt[a[i]] > 1:
        continue
    for k in range(a[i], maxval+1, a[i]):
        factor_cnt[k] += 1

result = sum(factor_cnt[v] <= 1 for v in a)
print(result)
import sys
input=sys.stdin.readline
from collections import deque
N=int(input())

graph=[[] for _ in range(N+1)]
for _ in range(N-1):
  a,b=map(int,input().split())
  graph[a].append(b)
  graph[b].append(a)
#print(graph)

def dfs_init(u,ls):
  global path
  visited[u]=True  
  if u==N:
    path=ls
    return
  
  for v in graph[u]:
    if not visited[v]:
      dfs_init(v,ls+[v])
  
path=[]  
visited=[False]*(N+1)
dfs_init(1,[1])
#print(path)

visited=[False]*(N+1)
set_f=set()
set_s=set()
turn=1
dq=deque(path)
while dq:
  #Fenec
  node_f=dq.popleft()
  visited[node_f]=True
  set_f.add(node_f)
  turn=-1
  
  if dq:
    #Snuke
    node_s=dq.pop()
    visited[node_s]=True
    set_s.add(node_s)
    turn=1
#print(set_f,set_s,visited,turn)

def dfs_fenec(u):
  global cnt_f
  if not visited[u]:
    visited[u]=True
    cnt_f+=1
  for v in graph[u]:
    if not visited[v]:
      dfs_fenec(v)

def dfs_snuke(u):
  global cnt_s
  if not visited[u]:
    visited[u]=True
    cnt_s+=1
  for v in graph[u]:
    if not visited[v]:
      dfs_snuke(v)
      
#fenec
cnt_f=0
for f in set_f:
  dfs_fenec(f)
  
#snuke
cnt_s=0
for s in set_s:
  dfs_snuke(s)
  
#print(cnt_f,cnt_s)
if turn==1:
  if cnt_f>cnt_s:
    print("Fennec")
  else:
    print("Snuke")
elif turn==-1:
  if cnt_f>=cnt_s:
    print("Fennec")
  else:
    print("Snuke")

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from collections import deque
N=int(input())

graph=[[] for _ in range(N+1)]
for _ in range(N-1):
  a,b=map(int,input().split())
  graph[a].append(b)
  graph[b].append(a)
#print(graph)

dist_f=[-1]*(N+1)
d=0
queue=[1]
while queue:  
  new_queue=set()
  for u in queue:
    dist_f[u]=d
    for v in graph[u]:
      if dist_f[v]==-1:
        new_queue.add(v)
        
  queue=list(new_queue)
  d+=1
#print(dist_f)

dist_s=[-1]*(N+1)
d=0
queue=[N]
while queue:  
  new_queue=set()
  for u in queue:
    dist_s[u]=d
    for v in graph[u]:
      if dist_s[v]==-1:
        new_queue.add(v)
        
  queue=list(new_queue)
  d+=1
#print(dist_s)

cnt_f,cnt_s=0,0
for i in range(1,N+1):
  if dist_f[i]<=dist_s[i]:
    cnt_f+=1
  else:
    cnt_s+=1

#print(cnt_f,cnt_s)
if cnt_f>cnt_s:
  print("Fennec")
else:
  print("Snuke")
a = input()
if re.match(r'[a-z]', a) :
	print 'a'
else:
	print 'A'

### FIXED CODE ###

import re

a = input()
if re.match(r'[a-z]', a) is not None:
	print('a')
else:
	print('A')