Harryxun/stf_run huggingface dataset:
# 060_a
A, B, C = input().split()

if (1<=len(A) and len(A)<=10 and A.islower()) and (1<=len(B) and len(B)<=10 and B.islower())\
        and (1<=len(C) and len(C)<=10 and C.islower()):
    if (A[len(A) - 1] == B[0]) and (B[0] == C[len(B) - 1]):
        print('YES')
    else:
        print('NO')


### FIXED CODE ###

# 060_a
A, B, C = input().split()

if (1<=len(A) and len(A)<=10 and A.islower()) and (1<=len(B) and len(B)<=10 and B.islower())\
        and (1<=len(C) and len(C)<=10 and C.islower()):
    if (A[len(A) - 1] == B[0]) and (B[len(B) - 1] == C[0]):
        print('YES')
    else:
        print('NO')
a = int(input())
ar = list(input())
b = 0
for r in ar:
  b += int(r)
if a % b == 0:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

b = input()
a = int(b)
ar = list(b)
b = 0
for r in ar:
  b += int(r)
if a % b == 0:
  print("Yes")
else:
  print("No")
import sys
n=int(input())
w=[input()]
check=True
for i in range (1,n):
    x = input()
    if x in w or w[i-1][len(x[i-1])-1]!=x[0]:
        check=False
    w.append(x)
if check:
    print('YES')
else:
    print('NO')



### FIXED CODE ###

a=int(input())
x=[]
flag=0
for i in range(a):
    s=input()
    if i==0:
        x.append(s)
        continue
    #print(s,x[i-1])
    if s in x or x[i-1][len(x[i-1])-1]!=s[0] :
        x.append("1")
        flag=1
    else:
        x.append(s)
if flag == 0:
    print("Yes")
else:
    print("No")
N = int(input())
A = int(input())
b = int(N / A)
c = N - 500 * b
if c > A:
    print("No")
else:
    print("Yes")

### FIXED CODE ###

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

if n % 500 <= a:
    print("Yes")
else:
    print("No")
H, W = map(int, input().split())
map_lis = [input() for i in range(H)]
ans = 0

def prob(x,y,h,w):
  if 0<=x<h and 0<=y<w:
    return True
  else:
    return False

def count(x,y,lis):
  if not lis[x][y]:
    return True
  else:
    return False

def maze(x,y,lis):
  if lis[x][y] == ".":
    return True
  else:
    return False

for i in range(H):
  for j in range(W):
    k = 0
    count_lis = np.zeros((H,W))
    num_lis = [[] for i in range(H*W)]
    num_lis[0].append([i,j])
    while True:
      for l in num_lis[k]:
        if prob(l[0]-1,l[1],H,W) and count(l[0]-1,l[1],count_lis) and maze(l[0]-1,l[1],map_lis):
          num_lis[k+1].append([l[0]-1,l[1]])
          count_lis[l[0]-1][l[1]] = 1
        if prob(l[0],l[1]-1,H,W) and count(l[0],l[1]-1,count_lis) and maze(l[0],l[1]-1,map_lis):
          num_lis[k+1].append([l[0],l[1]-1])
          count_lis[l[0]][l[1]-1] = 1
        if prob(l[0]+1,l[1],H,W) and count(l[0]+1,l[1],count_lis) and maze(l[0]+1,l[1],map_lis):
          num_lis[k+1].append([l[0]+1,l[1]])
          count_lis[l[0]+1][l[1]] = 1
        if prob(l[0],l[1]+1,H,W) and count(l[0],l[1]+1,count_lis) and maze(l[0],l[1]+1,map_lis):
          num_lis[k+1].append([l[0],l[1]+1])
          count_lis[l[0]][l[1]+1] = 1
      if num_lis[k+1] == []:
        break
      new_ans = 0
      for m in num_lis[1:]:
        if m != []:
          new_ans += 1
        if m == []:
          break
      ans = max(ans, new_ans)
      k += 1
    
                                           
print(new_ans)

### FIXED CODE ###

import numpy as np
H, W = map(int, input().split())
map_lis = [input() for i in range(H)]
ans = 0

def prob(x,y,h,w):
  if 0<=x<h and 0<=y<w:
    return True
  else:
    return False

def count(x,y,lis):
  if not lis[x][y]:
    return True
  else:
    return False

def maze(x,y,lis):
  if lis[x][y] == ".":
    return True
  else:
    return False

for i in range(H):
  for j in range(W):
    k = 0
    count_lis = np.zeros((H,W))
    num_lis = [[] for i in range(1000)]
    if maze(i,j,map_lis):
      count_lis[i][j] = 1
      num_lis[0].append([i,j])
    while True:
      for l in num_lis[k]:
        if prob(l[0]-1,l[1],H,W) and count(l[0]-1,l[1],count_lis) and maze(l[0]-1,l[1],map_lis):
          num_lis[k+1].append([l[0]-1,l[1]])
          count_lis[l[0]-1][l[1]] = 1
        if prob(l[0],l[1]-1,H,W) and count(l[0],l[1]-1,count_lis) and maze(l[0],l[1]-1,map_lis):
          num_lis[k+1].append([l[0],l[1]-1])
          count_lis[l[0]][l[1]-1] = 1
        if prob(l[0]+1,l[1],H,W) and count(l[0]+1,l[1],count_lis) and maze(l[0]+1,l[1],map_lis):
          num_lis[k+1].append([l[0]+1,l[1]])
          count_lis[l[0]+1][l[1]] = 1
        if prob(l[0],l[1]+1,H,W) and count(l[0],l[1]+1,count_lis) and maze(l[0],l[1]+1,map_lis):
          num_lis[k+1].append([l[0],l[1]+1])
          count_lis[l[0]][l[1]+1] = 1
      new_ans = 0
      for m in num_lis[1:]:
        if m != []:
          new_ans += 1
        if m == []:
          break
      ans = max(ans, new_ans)
      k += 1
      if num_lis[k] == []:
        break
                                     
print(ans)
import math
while 1:
	n = int(raw_input())
	if n == 0:
		break
	count = 0
	for p in range(n+1,2*n+1):
		d = 2
		ub = math.sqrt(p) + 1
		while d <= ub :
			if p != d and p % d == 0:
				break
			d += 1
		else:
			count += 1
	print count

### FIXED CODE ###

import math
MAX = 123456
def sieve (n):
	prime = [0,0]
	prime += [1 for i in range(n-1)]
	ub = math.sqrt(n) + 1
	d = 2
	while d <= ub:
		if prime[d] == 0:
			d += 1
			continue
		prod = 2
		while d * prod <= n:
			prime[d*prod] = 0
			prod += 1
		d += 1
	return prime
prime = sieve(2 * MAX)
while 1:
	n = int(raw_input())
	if n == 0:
		break
	print sum(prime[n+1:2*n+1])
N,X=map(int,input().split())
a=list(input().split())
s=0
i=0
while s<=X:
    s+=int(a[i])
    i+=1
print(i)    


### FIXED CODE ###

N,X=map(int,input().split())
a=list(input().split())
s=0
i=0
while s<=X:
    i+=1
    if i==N+1:
        break
    s+=int(a[i-1])
print(i)
import sys


def solv(s):
    left, right = s.split('=')
    for i in range(10):
        l = left.replace('X', str(i))
        r = right.replace('X', str(i))
        l1, l2 = l.split('+')
        if l1[0] == '0' or l2[0] == '0' or r[0] == '0':
            next
        if eval(l) == int(r):
            return str(i)
    else:
        return 'NA'


for line in sys.stdin:
    print solv(line.rstrip('\n'))

### FIXED CODE ###


import sys


def solv(s):
    for i in range(10):
        i = str(i)
        s2 = s.replace('X', i)
        left, right = s2.split('=')
        l1, l2 = left.split('+')
        if any([x[0] == '0' and len(x) > 1 for x in [l1, l2, right]]):
            continue
        if int(l1) + int(l2) == int(right):
            return i
    else:
        return 'NA'


for line in sys.stdin:
    print solv(line.rstrip('\n'))
n,m=map(int,input().split())
ab=[list(map(int,input().split())) for _ in range(n-1)]
pq=[list(map(int,input().split())) for _ in range(m)]
ab=sorted(ab, key=lambda x:x[0])
pq=sorted(pq, key=lambda x:x[0])

res=[0 for _ in range(n)]
for p,q in pq:
	res[p-1]+=q
for a,b in ab:
	res[b-1]+=res[a-1]
print(" ".join(res))

### FIXED CODE ###

n,m=map(int,input().split())
ab=[list(map(int,input().split())) for _ in range(n-1)]
pq=[list(map(int,input().split())) for _ in range(m)]
ab2=sorted(ab, key=lambda x:x[0])
pq2=sorted(pq, key=lambda x:x[0])

res=[0 for _ in range(n)]
for p,q in pq2:
	res[p-1]+=q
for a,b in ab2:
	res[b-1]+=res[a-1]
ans=str(res[0])
for i in range(1,n):
	ans+=" "+(str(res[i]))
print(ans)
a = int(input()
        
print(a*a)

### FIXED CODE ###

r = int(input())

print(r * r)
import math
from functools import reduce
def gcd_list(numbers):
    return reduce(math.gcd, numbers)
N, X = list(map(int, input().split()))
A = list(map(int, input().split()))
for i in range(N):
    A[i] = abs(A[i] - X)
print(gcd_list(A))


### FIXED CODE ###

N, X = list(map(int, input().split()))
A = list(map(int, input().split()))
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
for i in range(N):
    A[i] = abs(A[i] - X)
g = A[0]
for i in range(1, N):
    g = gcd(g, A[i])
print(g)
k = int(input())
a,b = int(input().split())
if k <= b - a:
  print('OK')
else:
  if b % k <= a % k:
    print('OK')
  else:
    print('NG')
   

### FIXED CODE ###

k = int(input())
a,b = map(int,input().split())
if k <= b - a:
  print('OK')
else:
  if b // k > a // k or a % k == 0:
    print('OK')
  else:

    print('NG')
s=input()
k=int(input())
ans=1
for i in range(len(s)):
  if s[i] !="1" and ans==1:
    ans=int(s[i])
    ans_c=i+1
print(ans if ans_c<=k else 1)

### FIXED CODE ###

s=input()
k=int(input())
ans=1
ans_c=0
for i in range(len(s)):
  if s[i] !="1" and ans==1:
    ans=int(s[i])
    ans_c=i+1
print(ans if ans_c<=k else 1)
8 3
ACACTACG
3 7
2 3
1 8

### FIXED CODE ###

N, Q = map(int, input().split())
S = input()
mLst = [0] * N
for i in range(N - 1):
    if S[i: i + 2] == 'AC':
        mLst[i + 1] = mLst[i] + 1
    else:
        mLst[i + 1] = mLst[i]

lLst = [list(map(int, input().split())) for i in range(Q)]

for i in range(Q):
    print(mLst[lLst[i][1] - 1] - mLst[lLst[i][0] - 1])
N = int(input())
A=list(map(int, input().split()))

def sol(i,want):
    num=int(N/(i+1))
    wa=-A[0]
    for j in range(num):
        wa+=A[i+j*i]
    wa=wa%2
    if wa==want:
        x=0
    else:
        x=1
#     print(num)
    return x 

B=A[:]
for i in range(half):
    j=half-1-i
#     print(j)
    B[j]=sol(j,A[j])
print(sum(B))
for b in B:
    print(b)

### FIXED CODE ###

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




def sol(i,want):
    num=N//(i+1)
    wa=B[i]

    for j in range(num):
        k=i+j*(i+1)
        wa+=B[k]
#         print(i,wa,B[i])
#         print((i+1)+j*(i+1)-1)
#     print(i,wa,B[i])
    wa=wa%2
#     print(i,wa,A[i])
    
    if wa==want:
        x=0
    else:
        x=1
#     print(num)
    return x 

B=A[:]
half=N//2
for i in range(half):
    j=half-1-i
#     print(j)
    B[j]=sol(j,A[j])
    
C=[i+1 for i, x in enumerate(B) if x ==1]

m=sum(B)
print(m)
print(*C)
from collections import deque
n,k=map(int,input().split())
l=list(map(int,input().split()))
kiseki=deque()
tori=[-1]*n
#町1からスタート
u=1
kiseki.append(1)
for i in range(len(l)):
  u=l[u-1]
  if kiseki.count(u)==0:
    kiseki.append(u)
  else:
    kiseki.append(u)
    break
kuri=[]
while True:
  if u == kiseki[0]:
    kiseki.pop()
    break
  kuri.append(kiseki.popleft())

if k<=len(kuri):
  print(kuri[k])
else:
  K=k-len(kuri)
  amari=K%len(kiseki)
  print(kiseki[amari])

### FIXED CODE ###

n,k=map(int,input().split())
l=list(map(int,input().split()))
kiseki=[-1]*n
i=0
v=1
while kiseki[v-1]==-1:
  kiseki[v-1]=i
  v=l[v-1]
  i+=1
saisyo=kiseki[v-1]
kuri=i-saisyo

if saisyo>k:
  print(kiseki.index(k)+1)
else:
  amari=(k-saisyo)%kuri
  print(kiseki.index(amari+saisyo)+1)
N = input()
N = int(N)
s = [[ int(i) for i in input().split()] for i in range(N)]
hoge = "True"
s = sorted(s, key=lambda s:s[1])
for i in s:
    time += s[0]
    if time > s[1]:
        hoge = "No" 
        break

print(hoge)

### FIXED CODE ###

N = input()
N = int(N)
s = [[ int(i) for i in input().split()] for i in range(N)]
time = 0
hoge = "Yes"
s = sorted(s, key=lambda s:s[1])
for i in s:
    time += i[0]
    if time > i[1]:
        hoge = "No" 
        break

print(hoge)
from heapq import heappop, heappush, heapify
n, k = map(int, input().split())
lst = [list(map(int, input().split())) for i in range(n)]
lst = sorted(lst, reverse=True, key=lambda x:x[1])
q = []
v = set()
cnt = 0
for t, d in lst[:k]:
    cnt += d
    if t in v:
        heappush(q, d)
    else:
        v.add(t)
cnt += len(v)**2
ans = cnt
for t, d in lst[k:]:
    if t not in v and len(q)!=0:
        x = heappop(q)
        cnt += d + 2*len(v) + 1 - x
        ans = max(ans, cnt)
print(ans)

### FIXED CODE ###

a, b, c = map(int, input().split())
print(int(a*b/2))
n = int(input())

if n in (2,4,5,7,9):
    yomi = 'hon'
if n in (0,1,6,8):
    yomi = 'pon'
if n == (3):
    yomi = 'bon'

print(yomi)

### FIXED CODE ###

n = int(input())

n = n % 10

if n in (2,4,5,7,9):
    yomi = 'hon'
if n in (0,1,6,8):
    yomi = 'pon'
if n == 3:
    yomi = 'bon'

print(yomi)
N, K = map(int, input().split())
A = list(map(int, input().split()))

buckets = {}
for i in A:
    if i in buckets:
        buckets[i] += 1
    else:
        buckets[i] = 1

kinds = sorted(buckets.values())
if K < len(kinds):
    mini = 0
    for i in range(len(kinds)):
        mini += kinds.pop(i)
        if len(kinds) <= K:
            break
    print(mini)
else:
    print(0)

### FIXED CODE ###

N, K = map(int, input().split())
A = list(map(int, input().split()))

buckets = {}
for i in A:
    if i in buckets:
        buckets[i] += 1
    else:
        buckets[i] = 1

kinds = sorted(buckets.values())
count = len(kinds)
if K < count:
    mini = 0
    for i in kinds:
        mini += i
        count -= 1
        if count <= K:
            break
    print(mini)
else:
    print(0)
n, m = map(int, input().split())
gates = []
for i in range(m):
    gates.append(list(map(int, input().split())))
candidate = [1, n]
for gate in gates:
    if candidate[0] < gate[0]:
        candidate[0] = gate[0]
    if gate[1] < candidate[1]:
        candidate[1] = gate[1]
if candidate[1] == canditate[0]:
    print(0)
else:
    print(candidate[1] - candidate[0] + 1)

### FIXED CODE ###

n, m = map(int, input().split())
gates = []
for i in range(m):
    gates.append(list(map(int, input().split())))
candidate = [1, n]
for gate in gates:
    if candidate[0] < gate[0]:
        candidate[0] = gate[0]
    if gate[1] < candidate[1]:
        candidate[1] = gate[1]
if (candidate[1] >= candidate[0]):
    print(candidate[1] - candidate[0] + 1)
else:
    print(0)
N = input()
if len(set(N[1:]) == 1 and len(set(N[:3])):
  print("Yes")
else
  print("No")

### FIXED CODE ###

N = input()
if len(set(N[1:])) == 1 or len(set(N[:3])) == 1:
  print("Yes")
else:
  print("No")
s = list(input())
t = list(input())

s.sort()
s=''.join(s)

t.reverse()
t=''.join(t)

if s =< t:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

s = list(input())
t = list(input())

s.sort()
s=''.join(s)

t.sort()
t.reverse()
t=''.join(t)

if s < t:
    print('Yes')
else:
    print('No')
N = int(input())
X = list(map(int,input().split()))
Y = X.copy()
Y.sort()

for x in X:
    Y.remove(x)
    print(Y[N//2-1])
    Y.append(x)
    Y.sort()

### FIXED CODE ###

from copy import deepcopy

N = int(input())
X = list(map(int,input().split()))

Y = X.copy()
Y.sort()

for x in X:
    if x <= Y[N//2-1]:
        print(Y[N//2])
    else:
        print(Y[N//2-1])
i1 = input()
i2 = int(i1.split(" ")[0])
i3 = int(i1.split(" ")[1])
i4 = 0
i5 = 0
i6 = 0
li = []
for i in range(i2):
  i4 = input().split(" ")
  i5 = (int(i4[1]) ** 2 - int(i4[0]) ** 2) ** 0.5
  if (i3 >= i5):
    i6 += 1
print(i6)

### FIXED CODE ###

i1 = input()
i2 = int(i1.split(" ")[0])
i3 = int(i1.split(" ")[1])
i4 = 0
i5 = 0
i6 = 0
li = []
for i in range(i2):
  i4 = input().split(" ")
  i5 = (float(i4[1]) ** 2 + float(i4[0]) ** 2) ** 0.5
  if i3 >= abs(i5):
    i6 += 1
print(i6)
S = input()
max = 0
ans = 0

for i in range(10):
  if S[i] == 'A' or S[i] == 'T' or S[i] == 'C' or S[i] == 'G':
    ans += 1
  else:
    if ans >= max:
      max = ans
    else:
      ans = 0

print(max)

### FIXED CODE ###

S = input()
max = 0
ans = 0

for i in range(len(S)):
  if S[i] == 'A' or S[i] == 'T' or S[i] == 'C' or S[i] == 'G':
    ans += 1
    if ans > max:
      max = ans
  else:
    ans = 0

print(max)
import numpy as np

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

  
a, b = map(int,input().split())
ad = make_divisors(a)
bd = make_divisors(b)
ab = list(set(ad) & set(bd))
ab.sort()
# print(ab)

prime = [1]
is_p = np.array([True]*(ab[-1]+1))
is_p[0] = False
for i in range(2, ab[-1]+1):
    if is_p[i]:
        prime.append(i)
        is_p[i::i] = False
# print(prime)

ans = list(set(ab) & set(prime))
print(len(ans))

### FIXED CODE ###

# 素因数分解
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

  
a, b = map(int,input().split())
aa = prime_factorize(a)
bb = prime_factorize(b)
ab = list(set(aa) & set(bb))
ab.sort()
print(len(ab)+1)
N = int(input())
t_old, x_old, y_old = 0

for i in range(N):
  t, x, y = map(int, input().split())
  dt = t - t_old
  dx = x - x_old
  dy = y - y_old
  t_old = t
  x_old = x
  y_old = y
  if abs(dx) + abs(dy) =< dt and (dt - (abs(dx) + abs(dy))) % 2 == 0:
    if i == N - 1:
      print('Yes')
  else:
    print('No')
    break
    

### FIXED CODE ###

N = int(input())
t_old, x_old, y_old = 0, 0, 0

for i in range(N):
  t, x, y = map(int, input().split())
  dt = t - t_old
  dx = x - x_old
  dy = y - y_old
  t_old = t
  x_old = x
  y_old = y
  if abs(dx) + abs(dy) <= dt and (dt - (abs(dx) + abs(dy))) % 2 == 0:
    if i == N - 1:
      print('Yes')
    pass
  else:
    print('No')
    break
import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    for z in range(int(math.sqrt(e))):
        for y in range(int(math.sqrt(e))):
            x = e - y*y- z*z*z 
            if x < 0:break
            if m > x+y+z: m = x+y+z
    print(m)


### FIXED CODE ###

import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y = int(math.sqrt(e-z**3))
        x = e - y**2- z**3 
        if x < 0:break
        if m > x+y+z: m = x+y+z    
        z+=1
    print(m)
import numpy as np



def main(N, M, a_list):
    fib_memo = {}
    fib_memo[0] = 1
    fib_memo[1] = 1
    def fib(n):
        if n not in fib_memo:
            fib_memo[n] = fib(n-1) + fib(n-2)
        return fib_memo[n]

    mul = 1
    old_a = 0

    for a in a_list:
        if a != 1 and old_a == a - 1:
            print(0)
            return

        mul *= (fib(a - old_a - 1) % 1000000007)
        old_a = a
        

    mul *= (fib(N - a_list[-1] -1) % 1000000007)
    print(mul % 1000000007)




if __name__ == "__main__":
    N, M = [int(x) for x in input().split()]
    a_list = []
    for _ in range(M):
        a_list.append(int(input()))

    main(N, M, a_list)


### FIXED CODE ###

def main(N, M, a_list):
    div = 10**9 + 7

    a_set = set(a_list)
    
    dp = {}
    dp[0] = 1
    if 1 in a_set:
        dp[1] = 0
    else:
        dp[1] = 1

    for i in range(N):
        if i+2 in a_set:
            dp[i+2] = 0
        else:
            dp[i+2] = (dp[i+1] + dp[i])
    
    print(dp[N] % div)


if __name__ == "__main__":
    N, M = [int(x) for x in input().split()]
    a_list = []
    for _ in range(M):
        a_list.append(int(input()))

    main(N, M, a_list)
n = int(input())
v = list(map(int,input().split()))

e = Counter(v[::2])
o = Counter(v[1::2])

e = sorted([(k,v) for k, v in e.items()],key = lambda z:z[1],reverse = True) + [(0,0)]
o = sorted([(k,v) for k, v in o.items()],key = lambda z:z[1],reverse = True) + [(0,0)]

if e[0][0] != o[0][0]:
    print(n - e[0][1] - o[0][1])
else:
    print(n - max(e[0][1] + o[1][1], e[1][1] + o[0][1]))

### FIXED CODE ###

from collections import Counter
n = int(input())
v = list(map(int,input().split()))

e = Counter(v[::2])
o = Counter(v[1::2])

ev = sorted([(k,i) for k, i in e.items()],key = lambda z:z[1],reverse = True) + [(0,0)]
od = sorted([(k,i) for k, i in o.items()],key = lambda z:z[1],reverse = True) + [(0,0)]

if ev[0][0] != od[0][0]:
    print(n - ev[0][1] - od[0][1])
else:
    print(n - max(ev[0][1] + od[1][1], ev[1][1] + od[0][1]))
r = int(input())

print(int(R ** 2))

### FIXED CODE ###

r = int(input())

print(int(r ** 2))
s = intput().split()
a = list(map(int, input().split()))
u = input()

if u == s[0]:
    print(a[0]-1, a[1])
else:
    print(a[0], a[1]-1)

### FIXED CODE ###

s = input().split()
a = list(map(int, input().split()))
u = input()

if u == s[0]:
    print(a[0]-1, a[1])
else:
    print(a[0], a[1]-1)
input()
s=input()
if len(a)%2==0 and a[:len(a)/2]==a[len(a)/2:]:
	print("Yes")
else:
	pritn("No")

### FIXED CODE ###

input()
a=input()
if len(a)%2==0 and a[:len(a)//2]==a[len(a)//2:]:
	print("Yes")
else:
	print("No")
import sys
fin = sys.stdin.readline


N, M = [int(elem) for elem in fin().split()]
adj = [[] for _ in range(N)]

for _ in range(N + M - 1):
    u, v = [int(elem) - 1 for elem in fin().split()]
    adj[u].append(v)

inv_adj = [[] for _ in range(N)]
for u, neighbors in enumerate(adj):
    for v in neighbors:
        inv_adj[v].append(u)

topo = []
visited = [False] * N

def dfs_visit(node):
    for neighbor in adj[node]:
        if visited[neighbor]:
            continue
        visited[neighbor] = True
        dfs_visit(neighbor)
    topo.append(node)
    return

for node in range(N):
    if not visited[node]:
        visited[node] = True
        dfs_visit(node)

topo = topo[::-1]

parent = [-1] * N
order = dict()
order[topo[0]] = 0
for number, node in enumerate(topo[1:], start=1):
    neighbors = inv_adj[node]
    correct_parent = -1
    for neighbor in neighbors:
        if neighbor in order and order[neighbor] > correct_parent:
            correct_parent = order[neighbor]
    parent[node] = correct_parent
    order[node] = number

order_to_number = {v: k + 1 for k, v in order.items()}
order_to_number[-1] = 0

for i in range(N):
    print(order_to_number[parent[i]])

### FIXED CODE ###

import sys
fin = sys.stdin.readline
sys.setrecursionlimit(500000)

N, M = [int(elem) for elem in fin().split()]
adj = [[] for _ in range(N)]

for _ in range(N + M - 1):
    u, v = [int(elem) - 1 for elem in fin().split()]
    adj[u].append(v)

inv_adj = [[] for _ in range(N)]
for u, neighbors in enumerate(adj):
    for v in neighbors:
        inv_adj[v].append(u)

topo = []
visited = [False] * N

def dfs_visit(node):
    for neighbor in adj[node]:
        if visited[neighbor]:
            continue
        visited[neighbor] = True
        dfs_visit(neighbor)
    topo.append(node)
    return

for node in range(N):
    if not visited[node]:
        visited[node] = True
        dfs_visit(node)

topo = topo[::-1]

parent = [-1] * N
order = dict()
order[topo[0]] = 0
for number, node in enumerate(topo[1:], start=1):
    neighbors = inv_adj[node]
    correct_parent = -1
    for neighbor in neighbors:
        if neighbor in order and order[neighbor] > correct_parent:
            correct_parent = order[neighbor]
    parent[node] = correct_parent
    order[node] = number

order_to_number = {v: k + 1 for k, v in order.items()}
order_to_number[-1] = 0

for i in range(N):
    print(order_to_number[parent[i]])
import math

N,M = [int(i) for i in input().split()]
A = [int(input()) for _ in range(M)]

m = 10**9+7

memo = [1]*(N+1)
for i in range(3,N+1):
    memo[i] = memo[i-1] + memo[i-2]

A.append(N+1)
p = A[0]
ans = memo[p]
for i in range(1,M+1):
    print(ans)
    if p+1 == A[i]:
        print(0)
        exit()
    else:
        ans *= memo[A[i]-p-1]
        ans %= m
    p = A[i]

print(ans)


### FIXED CODE ###

N,M = [int(i) for i in input().split()]
A = [int(input()) for _ in range(M)]

m = 10**9+7

memo = [1]*(N+3)
for i in range(3,N+3):
    memo[i] = memo[i-1] + memo[i-2]

memo[0] = 0

A.append(N+1)
p = A[0]
ans = memo[p]
for i in range(1,M+1):
    ans *= memo[A[i]-p-1]
    p = A[i]

print(ans%m)