Harryxun/stf_run huggingface dataset:
# coding: utf-8


def main():
    n, x = map(int, input().split())
    xi = map(int, input().split())

    diffs = []
    for i in xi:
        diffs.append(abs(x - i))

    for diff in diffs:
        if diff % min(diffs)) != 0:
            print('1')
            return

    print(min(diffs))


if __name__ == '__main__':
    main()


### FIXED CODE ###

# coding: utf-8

from functools import reduce


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


def gcd_list(numbers):
    return reduce(gcd, numbers)


def main():
    n, x = map(int, input().split())
    xi = map(int, input().split())

    diffs = []
    for i in xi:
        diffs.append(abs(x - i))

    print(gcd_list(diffs))


if __name__ == '__main__':
    main()
N = int(input())
A_list = [map(int, input().split())]
count = 0

while (True):
    exist_odd = False
    for i in range(N):
        if A_list[i] % 2 != 0:
            exist_odd = True

    if exist_odd:
        break
    
    for i in range(N):
        A_list[i] = A_list[i] / 2

    count = count + 1

print(count)

### FIXED CODE ###

N = int(input())
A_list = list(map(int, input().split()))
count = 0

while (True):
    exist_odd = False
    for i in range(N):
        if (A_list[i] % 2) != 0:
            exist_odd = True

    if exist_odd:
        break
    
    for i in range(N):
        A_list[i] = A_list[i] / 2

    count = count + 1

print(count)
S = input()

def rec(s):
    leng = len(s)
    if leng==0:
        print('YES')
    else:
        if leng>4:
            if s[0:5]=="dream":
                if leng==5:
                    rec(s[5:])
                else:
                    if s[5:7]=="er":
                        if s[5:10]=="erase":
                            if leng==10:
                                rec(s[10:])
                            elif s[10]=="r":
                                rec(s[11:])
                            else:
                                rec(s[10:])
                        else:
                            rec(s[7:])
                    else:
                        rec(s[5:])
            elif s[0:5]=="erase":
                if leng==5:
                    rec(s[5:])
                else:
                    if s[5]=="r":
                        rec(s[6:])
                    else:
                        rec(s[5:])
            else:
                print('NO')
        else:
            print('NO')
rec(S)

### FIXED CODE ###

S = input()
S = S[::-1]
l = ['dream','dreamer','erase','eraser']
L = []
pos = 0
f=True

for i in l:
    L.append(i[::-1])

while pos < len(S):
    no_match = True
    for candidate in L:
        if S[pos:pos+len(candidate)]==candidate:
            pos+=len(candidate)
            no_match =False
            break
    if no_match:
        f =False
        break


if f:
    print('YES')
else:
    print('NO')
def fib(n):
  a, b = 0, 1
  for i in range(n):
    a, b = b, a + b
  return b

n,m=map(int,input().split())
a=[int(input()) for i in range(m)]
ans = fib(a[0]-1)%1000000007
for i in range(m-1):
  if a[i+1]-a[i]==1:
    ans=0
    break
  ans = ans*fib(a[i+1]-a[i]-2)%1000000007
ans = ans*fib(n-a[m-1]-1)%1000000007
print(ans)

### FIXED CODE ###

def fib(n):
  a, b = 0, 1
  for i in range(n):
    a, b = b, a + b
    if b > 1000000007:
      b -= 1000000007
  return b

n,m=map(int,input().split())
if m==0:
  ans=fib(n)
else:
  a=[int(input()) for i in range(m)]
  ans = fib(a[0]-1)%1000000007
  for i in range(m-1):
    if a[i+1]-a[i]==1:
      ans=0
      break
    ans = ans*fib(a[i+1]-a[i]-2)%1000000007
  ans = ans*fib(n-a[m-1]-1)%1000000007
print(ans)
from functools import lru_cache

@ lru_cache(maxsize = None)
def sum(n):
  if n <= 0:
    return n
  return n + sum(n-1)
  
n = int(input())-1

print(sum(n))

### FIXED CODE ###

n = int(input())
print(n*(n-1)//2)
n,k=[s for s in input().split()]
n=int(n)
k=int(k)
hate=list(map(int, input().split())) #hate取得
like=[]
for i in range(1,10): #like取得
	if i not in hate:
		like.append(i)
pointer=0
		
for ichi in like: #1桁の場合
	if ichi>=n:
		kane=ichi
		pointer=1
		break

if pointer==0: #2桁の場合
	for ju in like:
		for ichi in like:
			if ju*10+ichi>=n:
				kane=ju*10+ichi
				pointer=1
				break

if pointer==0: #3桁の場合
	for hyaku in like:
		for ju in like:
			for ichi in like:
				if hyaku*100+ju*10+ichi>=n:
					kane=hyaku*100+ju*10+ichi
					pointer=1
					break

if pointer==0: #4桁の場合
	for sen in like:
		for hyaku in like:
			for ju in like:
				for ichi in like:
					if sen*1000+hyaku*100+ju*10+ichi>=n:
						kane=sen*1000+hyaku*100+ju*10+ichi
						pointer=1
						break

if pointer==1:
	print(kane)

### FIXED CODE ###

[a,b,c]=map(int, input().split())
list1=[a,b,c]
list1.sort()
if list1==[5,5,7]:
	print("YES")
else:print("NO")
A,B,C = [str(i) for i in input().split()]
N = str()

N = A[0] + B[0] + C[0]

ptint(N)

### FIXED CODE ###

s = input()
print('A' + s[8] + 'C')
# coding: utf-8
# Your code here!
import math

A,B,H,N = map(float, input().split())
# print(A)
# print(N)
Ak = 360*H/12+360/12*N/60
Bk = 360*N/60
# print(Ak)
# print(Bk)
sita = abs(Ak-Bk)
if abs(Ak-Bk)>180:
    sita = 360-abs(Ak-Bk)
# print(sita)
# print(max(A,B))
# print(360/sita)
Ko1 = 2*max(A,B)*math.sin((math.pi/(180/sita))/2)
# print(Ko1)
ans = Ko1*min(A,B)/max(A,B)
if(H==N==0):
    print(abs(A-B))
else:
    print(ans)


'''
n = int(input())
s = input()
if len(s)<=n:
    print(s)
elif len(s)>n:
    print(s[0:n]+"...")
'''
'''
n = input()
s = n[-1:]
a  = ["0" , "1" ,"6", "8"]
b=["3"]
c = ["2","4","5","7","9"]
print(s)

if s in a:
    print("pon")
elif s in b:
    print("bon")
elif s in c:
    print("hon")
'''


### FIXED CODE ###

import math

A,B,H,M = map(float, input().split())
pi = math.pi
Ak = 360*H/12+360/12*M/60
Bk = 360*M/60
Ak = Ak/180*pi
Bk = Bk/180*pi
# print(Ak)
# print(Bk)
ans = A*A+B*B-2*A*B*math.cos(Ak-Bk)
print(math.sqrt(ans))
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
input = sys.stdin.readline

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

def main():

	N = int(input())
	# = list(input())
	#L,R = map(int, input().split(" "))
	#L = list(map(int, input().split(" ")))
	A = input().split()
	A = [int(s) for s in A]
	#P = getPrimeNumList(200000)

	tmp = A[1]
	for i in range(4, N, 2):
		if tmp != A[i-1]:
			print(-1)
			sys.exit()

	ans = []
	hafe = N//2
	for i in range(N, 0, -1):
		if i > hafe:
			if A[i-1] == 1:
				ans.append(i)
			continue

		if A[i-1] != A[(i*2)-1]:
			ans.append(i)

	print(len(ans))
	if len(ans) != 0:
		ans2 = ""
		for i in reversed(ans):
			ans2 = ans2 + str(i) + " "

		print(ans2[:-1])

def getPrimeNumList(n):
	is_prime = [True] * (n + 1)
	is_prime[0] = False
	is_prime[1] = False
	for i in range(2, int(n**0.5) + 1):
		if not is_prime[i]:
			continue
		for j in range(i * 2, n + 1, i):
			is_prime[j] = False
	return [i for i in range(n + 1) if is_prime[i]]

if __name__ == "__main__":
	main()


### FIXED CODE ###

import sys
 
def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7
 
N=INT()
A=LIST()
 
# その位置にボールを入れるかを保持するA2
A2=[0]*N
B=[]
# 後ろから決めていく
for i in range(N-1, -1, -1):
    cur=i+1
    cnt=0
    # curの倍数を全部見に行く
    for j in range(cur*2, N+1, cur):
        cnt^=A2[j-1]
    # ボールを入れるべきかどうか
    if A[i]!=cnt:
        B.append(cur)
        A2[i]=1
 
print(len(B))
print(*B)
a=int(input())
assert(a>0)
if a > 500:
    print((a//500)*1000+((a%500)//5)*5)
else:
    print(a//5*5)

### FIXED CODE ###

a=int(input())
print((a//500)*1000+((a%500)//5)*5)
n,k=map(int,input())
s=list(input())
s[k-1]=s[k-1].lower()
print(''.join(s))


### FIXED CODE ###

n,k=map(int,input().split())
s=list(input())
s[k-1]=s[k-1].lower()
print(''.join(s))
import math
a,b,h,m=map(int,input().split())
tyok=h*30+m*0.5
tank=m*6
sa=abs(tyok-tank)
c=a**2+b**2-2*a*b*math.cos(math.radians(sa))
print(math.sqrt(c))


### FIXED CODE ###

n=list(input())
if n[-1]=='3':
  print('bon')
elif n[-1]=='0' or n[-1]=='1' or n[-1]=='6' or n[-1]=='8':
  print("pon")
else :
  print("hon")
def change(n, word):
    for i in range(len(ans)-1, n, -1):
        ans[i] = ans[i-1]
    ans[n] = word

s = input()
k = int(input())
p = min(len(s), k)
key = s[:p]

for i in range(1, len(s)+1-p):
  if key > s[i:i+k]:
    key = s[i:i+k]

ans = [0]*k
for i in range(k):
  if i < p:
    ans[i] = key[:i+1]
  else:
    ans[i] = "zzzzzz"
for i in range(len(s)-p, len(s)):
    for j in range(i+1, len(s)+1):
        print(s[i:j])
        for t in range(k):
            if s[i:j] < ans[t] and s[i:j] not in ans:
                change(t, s[i:j])
print(ans[k])

### FIXED CODE ###

def change(n, word):
    for i in range(len(ans)-1, n, -1):
        ans[i] = ans[i-1]
    ans[n] = word

s = input()
k = int(input())
p = min(len(s), k)
key = s[:p]

for i in range(1, len(s)+1-p):
  if key > s[i:i+k]:
    key = s[i:i+k]

ans = [0]*k
for i in range(k):
  if i < p:
    ans[i] = key[:i+1]
  else:
    ans[i] = "zzzzzz"
for i in range(len(s)-p, len(s)):
    for j in range(i+1, len(s)+1):
        for t in range(k):
            if s[i:j] < ans[t] and s[i:j] not in ans:
                change(t, s[i:j])
print(ans[k-1])
a, b, c = list(map(int, input().split()))
values = sorted(list(set([a, b, c])))
ans = values[0] + values[1]
print(ans)


### FIXED CODE ###

a, b, c = list(map(int, input().split()))
values = sorted([a, b, c])
ans = values[0] + values[1]
print(ans)
import sys
sys.setrecursionlimit(10 ** 7)
read = sys.stdin.buffer.read 
inp = sys.stdin.buffer.readline
 
from numba import jit
import numpy as np
@jit
def resolve():
    N, K = map(int, inp().split())
    A = np.array(list(map(int, inp().split())), np.int64)
 
    for _ in range(K):
        imos_table = np.zeros(N + 1, np.int64)
        for i, a in enumerate(A):
            # 配列の個数を超えないように注意
            imos_table[max(i - a, 0)] += 1
            imos_table[min(i + a + 1, N)] -= 1
        A = np.cumsum(imos_table)[:-1]
        if np.all(A == N):
            print(*A)
            return
    else:
        print(*A)
        
if __name__ == "__main__":
    resolve()

### FIXED CODE ###


from itertools import accumulate
def resolve():

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

    for _ in range(K):
        imos_table = [0]*(N+1)
        for i, a in enumerate(A):
            # 配列の個数を超えないように注意
            imos_table[max(i - a, 0)] += 1
            imos_table[min(i + a + 1, N)] -= 1
        A = list(accumulate(imos_table))[:-1]
        if all([True if a == N else False for a in A]):
            print(*A)
            return
    else:
        print(*A)

if __name__ == "__main__":
    resolve()
N=int(input())
A=list(map(int, input().split()))
B=list(map(int, input().split()))
C=list(map(int, input().split()))

def binary_search(list,target,b):
    left = 0
    right = len(list) - 1

    while left <= right:
        center = (left + right)//2
        if list[center] == target:
            if b:
                while list[center]==target:
                    center+=1
            return center
        elif list[center] < target:
            left = center + 1
        elif list[center] > target:
            right = center - 1

    if list[center]<target:
        center+=1
    return center

A.sort()
C.sort()
ans=0
for b in B:
    ans+=binary_search(A,b,0)*(len(C)-binary_search(C,b,1))
print(ans)


### FIXED CODE ###

import bisect
N=int(input())
A=list(map(int, input().split()))
B=list(map(int, input().split()))
C=list(map(int, input().split()))

A.sort()
C.sort()
ans=0
for b in B:
    ans+=bisect.bisect_left(A,b)*(len(C)-bisect.bisect_right(C,b))
print(ans)
n,m=map(int,input().split())
a=[int(input()) for _ in range(m)]
def fb(num):
    a,b = 1,0
    for _ in range(num+1):
        a,b = a+b,a
    return b%(10**9+7)
if m=0:
    print(fb(n)%(10**9+7))
    exit()
if m>1:
    for i in range(m-1):
        if a[i+1]-a[i]==1:
            print(0)
            exit()
c=0
for i in range(m):
    if i==0 and a[0]==1:
        c+=1
    elif i==0:
        c+=fb(a[0]-1)
    else:
        c*=(fb(a[i]-a[i-1]-2)%(10**9+7))
c*=fb(n-a[-1]-1)%(10**9+7)
print(c%(10**9+7))

### FIXED CODE ###

n,m=map(int,input().split())
a=[int(input()) for _ in range(m)]
def fb(num):
    a,b = 1,0
    for _ in range(num+1):
        a,b = a+b,a
    return b
if m==0:
    print(fb(n)%(10**9+7))
    exit()
if m>1:
    for i in range(m-1):
        if a[i+1]-a[i]==1:
            print(0)
            exit()
c=0
for i in range(m):
    if i==0 and a[0]==1:
        c+=1
    elif i==0:
        c+=fb(a[0]-1)
    else:
        c*=(fb(a[i]-a[i-1]-2)%(10**9+7))
c*=fb(n-a[-1]-1)%(10**9+7)
print(c%(10**9+7))
s = input()
cha = list()
answer = []
for hoge in int_cha:
  if hoge == '1':
    answer.append('9')
  else:
    answer.append('1')
print(''.join(answer))


### FIXED CODE ###

s = input()
cha = list(s)
answer = []
for hoge in cha:
  if hoge == '1':
    answer.append('9')
  else:
    answer.append('1')
print(''.join(answer))
from fractions import gcd
from functools import reduce

def gcd(numbers):
    return reduce(gcd, numbers)

n, x = list(map(int, input().split()))
b = list(map(int, input().split()))

a = []
for i in b:
    if i != x:
        a.append(abs(i-x))
print(gcd(a))

### FIXED CODE ###

import fractions
from functools import reduce

def gcd(numbers):
    return reduce(fractions.gcd, numbers)

n, x = list(map(int, input().split()))
b = list(map(int, input().split()))

a = []
for i in b:
    if i != x:
        a.append(abs(i-x))
print(gcd(a))
LIM=200004
L=[0]*LIM

def bin_sum(Y):
    S=bin(Y)[2:]
    count=0
    for i in range(len(S)):
        count+=int(S[i])
    return count

def bin_sum2(Y):
    count=0
    for i in range(len(Y)):
        count+=int(Y[i])
    return count

for i in range(1,LIM):
    L[i]+=bin_sum(i)

def pop_num(N,b,L):
    if N==0:
        return 0
    v=N%b
    return pop_num(v,L[v],L)+1
    
M=[0]*200005
for i in range(1,200004):
    M[i]+=pop_num(i,L[i],L)
X=int(input())
Y=input()
d=bin_sum2(Y)+1
c=bin_sum2(Y)-1
e=int(Y,2)%d
f=int(Y,2)%c
for i in range(X):
    if Y[i]=="0":
        b=d
        g=(e+2**(X-1-i))%d
    else:
        b=c
        g=(f-2**(X-1-i)%c+c)%c
    if d==1:
        print(0)
    elif g==0:
        print(1)
    else:
        print(M[g]+1)

### FIXED CODE ###

from collections import deque
LIM=200004
L=[0]*LIM

def bin_sum(Y):
    S=bin(Y)[2:]
    count=0
    for i in range(len(S)):
        count+=int(S[i])
    return count

def bin_sum2(Y):
    count=0
    for i in range(len(Y)):
        count+=int(Y[i])
    return count

for i in range(1,LIM):
    L[i]+=bin_sum(i)

def pop_num(N,b,L):
    if N==0:
        return 0
    v=N%b
    return pop_num(v,L[v],L)+1
    
M=[0]*200005
for i in range(1,200004):
    M[i]+=pop_num(i,L[i],L)
X=int(input())
Y=input()
d=bin_sum2(Y)
e=int(Y,2)%(d+1)
f=int(Y,2)%max(1,(d-1))
O=[1]*(X+2)
P=[1]*(X+2)
q=max(d-1,1)
for i in range(1,X+1):
    O[i]=O[i-1]*2%q
    P[i]=P[i-1]*2%(d+1)
for i in range(X):
    
    if int(Y[i])==1:
        b=max(d-1,1)
        flag=max(0,d-1)
        g=(f-O[X-1-i]+b)%b
    else:
        b=d+1
        flag=1
        g=(e+P[X-1-i])%b

    if flag==0:
        print(0)
    elif g==0:
        print(1)
    else:
        print(M[g]+1)
import sys
def main():
    input = sys.stdin.readline
    N, A, B = map(int,input.split())
    #print('N:%d A:%d B: %d' % (N,A,B)) 

    answer = []
    for i in range(N+1):
        s = sum( map(int,list(str(i)) )) # list of int -> sum
        if s >= A and s <= B: answer.append(i)
        #print('i:%d s:%d' % (i,s))
    print(sum(answer))

if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    N, A, B = map(int,input().split())
    #print('N:%d A:%d B: %d' % (N,A,B)) 

    answer = []
    for i in range(N+1):
        s = sum( map(int,list(str(i)) )) # list of int -> sum
        if s >= A and s <= B: answer.append(i)
        #print('i:%d s:%d' % (i,s))
    print(sum(answer))

if __name__ == "__main__":
    main()
mod=10**9+7
x,y=map(int,input().split())

a=(-x+2*y)//3
b=(2*x-y)//3

f=[1]
for i in range(1,a+b+1):
    f.append(f[-1]*i%mod)

if a+2*b==x and 2*a+b==y:
    print(f[a+b]*pow(f[a]*f[b],mod-2,mod)%mod)
else:
    print(0)


### FIXED CODE ###

import sys
mod=10**9+7
x,y=map(int,input().split())

a=(-x+2*y)//3
b=(2*x-y)//3

if a<0 or b<0:
  print(0)
  sys.exit()
  
f=[1]
for i in range(1,a+b+1):
    f.append(f[-1]*i%mod)

if a+2*b==x and 2*a+b==y:
    print(f[a+b]*pow(f[a]*f[b],mod-2,mod)%mod)
else:
    print(0)
i = 1
while 1:
  x,y = map( int , raw_input().split() )
  if x == 0 and y == 0
    break
  change = x
  x = y
  y = change
  print "%d %d" %(x,y) 

### FIXED CODE ###

while 1:
  x,y = map( int , raw_input().split() )
  if x == 0 and y == 0:
    break
  elif x <= y:
    print "%d %d" %(x,y) 
  elif y < x : 
    print "%d %d" %(y,x)
s = input()
boin = [a,e,i,o,u]
if s in boin:
  print('vowel')
else:
  print('consonant')

### FIXED CODE ###

s = input()
boin = ["a","e","i","o","u"]
if s in boin:
  print('vowel')
else:
  print('consonant')
a, *b, c = input()
print(a+str(len(*b))+c)

### FIXED CODE ###

s = input()
print(s[0], str(len(s)-2), s[-1], sep='')
n,m = map(int,input().split())
a = [list(input()) for i in range(n)]
b = [list(input()) for i in range(m)]

for i in range(n):
    for j in range(n):
        t = 1
        for k in range(m):
            for l in range(m):
                if a[i+k][j+l] != b[k][l]:
                    t = 0
        if t == 1:
            print('Yes')
            exit(0)

print('No')

### FIXED CODE ###

n,m = map(int,input().split())
a = [list(input()) for i in range(n)]
b = [list(input()) for i in range(m)]

for i in range(n-m+1):
    for j in range(n-m+1):
        t = 1
        for k in range(m):
            for l in range(m):
                if a[i+k][j+l] != b[k][l]:
                    t = 0
        if t == 1:
            print('Yes')
            exit(0)

print('No')
a, b = input().split()
if (a*b) % 2 == 0:
  print("Even")
else:
  print("Odd")

### FIXED CODE ###

a, b = map(int, input().split())
if (a*b) % 2 == 0:
  print("Even")
else:
  print("Odd")
n,k=map(int,input().split())
v=list(map(int,input().split()))
def get(t,s): # t個のうち前からs個
    return sorted(v[:s]+v[n-(t-s):])

def f(t):
    res=0
    for i in range(t+1):
        if 2*t-k>=0:
            if i>n:
                a=get(t,n)
            else:
                a=get(t,i)
            tmp=sum(a)
            for j in range(min(k-t,t)):
                tmp-=a[j]
                res=max(res,tmp)
    return res

ans=0
for i in range(1,k+1):
    ans=max(ans,f(i))
print(ans)

### FIXED CODE ###

n,k=map(int,input().split())
v=list(map(int,input().split()))
def get(t,s): # t個のうち前からs個
    return sorted(v[:s]+v[n-(t-s):])

def f(t):
    res=0
    for i in range(t+1):
        a=get(min(t,n),min(i,n))
        tmp=sum(a)
        res=max(res,tmp)
        for j in range(min(k-t,t,n)):
            tmp-=a[j]
            res=max(res,tmp)
    return res

ans=0
for i in range(1,k+1):
    ans=max(ans,f(i))
print(ans)
def main():
  N=int(input())
  S=input()
  n=len(S)
  if n%2==0:
    if all(S[i]==S[n/2+i] for i in range(n/2)):
      print("Yes")
    else:
      print("No")
  else:
    print("No")
 main()

### FIXED CODE ###

def main():
  N=int(input())
  S=input()
  n=len(S)
  T=S[0:n//2]
  if n%2==0:
    if S==T+T:
      print("Yes")
    else:
      print("No")
  else:
    print("No")
main()
import collections

bluecard = []
redcard = []

n = int(input())
for i in range(n):
    bluecard.append(input())

m = int(input())
for i in range(m):
    bluecard.append(input())

blue_count = collections.Counter(bluecard)
red_count = collections.Counter(redcard)
diff = red_count - blue_count
print(diff.most_common(1)[0][1])



### FIXED CODE ###

import collections

bluecard = []
redcard = []

n = int(input())
for i in range(n):
    bluecard.append(input())

m = int(input())
for i in range(m):
    redcard.append(input())

blue_count = collections.Counter(bluecard)
red_count = collections.Counter(redcard)
diff = blue_count - red_count
if len(diff.keys()) > 0:
    print(diff.most_common(1)[0][1])
else:
    print(0)
n,m=map(int, input().split())
l=[]
cnt=0
if m==1:
    s,c=map(int, input().split())
    if s==1 and c==0:
        print('-1')
    elif s!=n:
        print(10**(n-1)+c*(10**(n-s)))
    else:
        print(c*(10**(n-s))
else:
    for i in range(m):
        s,c=map(int, input().split())
        l.append([s,c])
        if s==1 and c==0: #最上位の位が0の時に対する処理
            cnt+=1
    buf=0
    for i in range(m-1):
        for j in range(i+1,m):
            if l[i][0]==l[j][0] and l[i][1]!=l[j][1]:
                buf+=1
    if buf!=0 or cnt!=0:
        print('-1')
    else:
        l.sort()
        ans=l[0][1]*(10**(n-l[0][0]))
        for i in range(1,m):
            if l[i-1][0]==l[i][0]:
                continue
            else:
                ans+=l[i][1]*(10**(n-l[i][0]))
        print(ans)

### FIXED CODE ###

import sys
n,m=map(int,input().split())
ans=[0]*n
scash=[]
buf=0
for i in range(m):
    s,c=map(int,input().split())
    if s not in scash:
        ans[s-1]+=c
        scash.append(s)
    elif (s in scash) and c!=ans[s-1]:
        buf+=1
        scash.append(s)
if n==1 and ans[0]==0:
    print(0)
    sys.exit()
if buf==0 and ans[0]!=0:
    anstr=[str(num) for num in ans]
    print(''.join(anstr))
elif buf==0 and (1 not in scash):
    ans[0]+=1
    anstr=[str(num) for num in ans]
    print(''.join(anstr))
else:
    print(-1)
n,k=map(int,input().split())
p=list(int(input()))
maxy=0
for i in range(n-k):
  for q in range(k):
    temp+=p[i+q]
  if temp>maxy:
    maxy=temp
    
print(maxy/2)
  

### FIXED CODE ###

n,k= map(int, input().split())
p = list(map(int, input().split()))
ans = sum(p[:k])
q = [ans]
for i in range(k,n):
  ans = ans+p[i]-p[i-k]
  q.append(ans)
print((max(q)+k)/2)
b=int(input())
if b>=500:
      overall=b*2
      print(overall)
elif b<=499 and b>0:
      print(b)
elif b<=0:
      print(0)

### FIXED CODE ###

inputs = str(input())
lists = []
lists.append(inputs)
if inputs[2] == inputs[3] and inputs[4] == inputs[5]:
      print('Yes')
else:
      print('No')