Harryxun/stf_run huggingface dataset:
# -*- coding: utf-8 -*-
import collections


N = int(input())

i = 0
W = []
while i < N:
    W.append(str(input()))
    i += 1

for i in range(len(W)):
    if W[i][0] != W[i+1][-1]:
        print('No')
        break

c = collections.Counter(W)

if c.values() in range(2, N+1):
    print('No')

else:
    print('Yes')

### FIXED CODE ###

def abc112_b():
    n, limit_time = map(int, input().split())
    ans = 1001

    for _ in range(n):
        cost, time = map(int, input().split())

        if time <= limit_time and ans > cost:
            ans = cost

    return ans if ans != 1001 else "TLE"


def abc109_b():
    length = int(input())
    word_list = []

    for _ in range(length):
        word_list.append(input())

    for i in range(len(word_list) - 1):

        if word_list.count(word_list[i]) >= 2 or word_list[i][-1] != word_list[i+1][0]:
            return "No"

    return "Yes"


if __name__ == '__main__':
    print(abc109_b())
num=input()
candy=0
ans=0
for i in range(num):
  candy+=1
  ans+=candy
print(ans)

### FIXED CODE ###

num=int(input())
candy=0
ans=0
for i in range(num):
  candy+=1
  ans+=candy
print(ans)
N,M = map(int,input().split())
A= list(map(int,input().split()))
BC=[list(map(int,input().split())) for _ in M]
A.sort()
BC.sort(key=lambda x:-x[1])
i = 0
for B,C in BC:
    for j in range(i,min(N,i+B)):
        if A[j]<C:A[j]=C
    i = i+B
print(sum(A))


### FIXED CODE ###

a,b=map(int,input().split())
if a >= 13:
    print(b)
elif 6<=a<=12:
    print(int(b/2))
else:
    print("0")
o=list(input())
e=list(input())+[""]
n=max(len(o),len(e))
for i in range(n):
  print(o[i]+e[i],end="")

### FIXED CODE ###

o=list(input())
e=list(input())+[""]
for x,y in zip(o,e):print(x+y,end="")
a, b, c = [int(input()) for _ in range(3)]
if (a == b != c) or (b == c != a) or (c == a != b):
  print(2)
elif (a == b == c):
  print(1)
else:
  print(3)

### FIXED CODE ###

color = list(map(int,input().split()))
print(len(set(color)))
#!/usr/bin/env python
import sys

input = sys.stdin

def tax(pct8, pct10):
    pct8low_x10 = pct8 * 125
    if pct8low_x10 % 10 == 0:
        pct8low = pct8low_x10 // 10
    else:
        pct8low = pct8low_x10 // 10 + 1

    pct8high_x10 = (pct8 + 1) * 125

    if pct8high_x10 % 10 == 0:
        pct8high = pct8high_x10 // 10 - 1
    else:
        pct8high = pct8high_x10 // 10

    pct10low = pct10 * 10
    pct10high = (pct10 + 1) * 10 - 1

    if pct8high < pct10low or pct10high < pct8low:
        return -1
    else:
        return max(pct8low, pct10low)

def test():
    for i in range(1, 100+1):
        for j in range(1, 100+1):
            price = tax(i, j)
            if price > 0:
                if int(price *.08) != i or int(price * .1) != j:
                    print(f"Wrong! tax({i},{j}) -> {price} but price*0.8={int(price*0.08)} and price*0.1={int(price*0.1)}")

pct8, pct10 = map(int, input.readline().split(" "))
print(tax(pct8, pct10))
#test()


### FIXED CODE ###

#!/usr/bin/env python
import sys

input = sys.stdin

def tax(pct8, pct10):
    pct8low_x10 = pct8 * 125
    if pct8low_x10 % 10 == 0:
        pct8low = pct8low_x10 // 10
    else:
        pct8low = pct8low_x10 // 10 + 1

    pct8high_x10 = (pct8 + 1) * 125

    if pct8high_x10 % 10 == 0:
        pct8high = pct8high_x10 // 10 - 1
    else:
        pct8high = pct8high_x10 // 10

    pct10low = pct10 * 10
    pct10high = (pct10 + 1) * 10 - 1

    if pct8high < pct10low or pct10high < pct8low:
        return -1
    else:
        return max(pct8low, pct10low)

#def test():
#    for i in range(1, 100+1):
#        for j in range(1, 100+1):
#            price = tax(i, j)
#            if price > 0:
#                if int(price *.08) != i or int(price * .1) != j:
#                    print(f"Wrong! tax({i},{j}) -> {price} but price*0.8={int(price*0.08)} and price*0.1={int(price*0.1)}")

pct8, pct10 = map(int, input.readline().split(" "))
print(tax(pct8, pct10))
#test()
try:
s = input()
if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
    print('Bad')
else:
    print('Good')
except EOFError:
    pass


### FIXED CODE ###

try:
    s = input()
    if s[0] == s[1] or s[1] == s[2] or s[2] == s[3]:
        print('Bad')
    else:
        print('Good')
except EOFError:
    pass
n, k = map(int, input().split())
hs = input().split()
num = 0
for i in range(len(n)):
  if int(hs[i]) >= k:
    num += 1
print(num)

### FIXED CODE ###

n, k = map(int, input().split())
hs = input().split()
num = 0
for i in range(n):
  if int(hs[i]) >= k:
    num += 1
print(num)
N = int(input())
G = [[] for _ in range(N)]
for _ in range(N - 1):
    u, v, w = map(int, input().split())
    u -= 1
    v -= 1
    G[u].append((v, w))
    G[v].append((u, w))

C = [-1 for _ in range(N)]


def dfs(pos, color):
    for e in G[pos]:
        if C[e[0]] != -1:
            continue
        # odd
        if e[1] & 1:
            c = 1 - color
            C[e[0]] = c
            dfs(e[0], c)
        # even
        else:
            c = color
            C[e[0]] = c
            dfs(e[0], c)


C[0] = 0
dfs(0, 0)
for i in range(N):
    print(C[i])


### FIXED CODE ###

import sys
sys.setrecursionlimit(100000)

N = int(input())
G = [[] for _ in range(N)]
for _ in range(N - 1):
    u, v, w = map(int, input().split())
    u -= 1
    v -= 1
    G[u].append((v, w))
    G[v].append((u, w))

C = [-1 for _ in range(N)]


def dfs(pos, color):
    C[pos] = color
    for e in G[pos]:
        if C[e[0]] != -1:
            continue
        # odd
        if e[1] & 1:
            c = 1 - color
            dfs(e[0], c)
        # even
        else:
            c = color
            dfs(e[0], c)


dfs(0, 0)
for i in range(N):
    print(C[i])
a, b = map(int, input().split())
c, d = map(int, input().split())
if (a*b)==(c*d):
 print((a*b)-(c*d))
else if (a*b ) > (c*d):
  print((c*d))

### FIXED CODE ###

a, b = map(int, input().split())
c, d = map(int, input().split())
print((a-c)*(b-d))
n=int(input())
for i in range(1,n+1):
 ans=0
 for x in range(1,i):
  for y in range(1,i):
   for z in range(1,i):
    if i==(x+y+z)**2-x*y-x*z-y*z:
      ans+=1
 print(ans)  

### FIXED CODE ###

l,r,k=map(int,input().split())
ans=0
for i in range(l,r+1):
 if i%k==0:
  ans+=1
 else:
  pass
print(ans)
n = int(input())
s = input().split("")

s = list(set(s))

print(len(s))

### FIXED CODE ###

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

new = s[0]
count = 1

for i in s:
  if new == i:
    continue;
  else:
    count += 1
    new = i
  
print(count)
D = int(input)
print('Christmas' + ' Eve' * (25 - D))


### FIXED CODE ###

D = int(input())
print('Christmas' + ' Eve' * (25 - D))
k = input()
a, b = map(int, input().split())
ka = a // k
kb = b // k
if b - a >= k - 1:
  print("OK")
elif kb - ka > 0:
  print("OK")
else:
  print("NG")

### FIXED CODE ###

k = int(input())
a, b = map(int, input().split())
ka = a // k
kb = b // k
if b - a >= k - 1:
  print("OK")
elif kb - ka > 0:
  print("OK")
elif a % k == 0 or b % k == 0:
  print("OK")
else:
  print("NG")
s = input("")                                                                                                           t = input("")                                                                                                           s_list = list(s)                                                                                                        t_list = list(t)                                                                                                        n = 0                                                                                                                                                                                                                                           for i in range(3):                                                                                                          if s_list[i] == t_list[i]:                                                                                                  n += 1                                                                                                                                                                                                                                  print(n)  s = input("")                                                                                                           t = input("")                                                                                                           s_list = list(s)                                                                                                        t_list = list(t)                                                                                                        n = 0                                                                                                                                                                                                                                           for i in range(3):                                                                                                          if s_list[i] == t_list[i]:                                                                                                  n += 1                                                                                                                                                                                                                                  print(n)  

### FIXED CODE ###

s = input("")
t = input("")
s_list = list(s)
t_list = list(t)
n = 0

for i in range(3):
    if s_list[i] == t_list[i]:
        n += 1

print(n)
import numpy as np

N, K = [int(a) for a in input().split()]
A = [int(a) for a in input().split()]

K_str = format(K, 'b')
max_order = len(K_str)

B = np.array([list(format(a, '0{}b'.format(max_order)))
              for a in A]
             ).astype('i')[:, :max_order]
B = B.sum(axis=0)
B = np.where(B < N/2, 1, 0)
for i in range(max_order):
    if int(K_str[i]) < B[i]:
        B[i] = 0

X_str = ''.join(map(str, B))
X = int(X_str, 2)

print(sum(map(lambda a: X ^ a, A)))

### FIXED CODE ###

import numpy as np

N, K = [int(a) for a in input().split()]
A = [int(a) for a in input().split()]

K = format(K, 'b')
B = [format(a, 'b') for a in A]
max_order = len(max(B + [K], key=len))

K = K.zfill(max_order)
B = np.array([list(b.zfill(max_order)) for b in B], dtype='i')
B = B.sum(axis=0)
B = np.where(B < N/2, '1', '0')

for i, k, b in zip(range(max_order), K, B):
    if k < b:
        B[i] = '0'
    elif k > b:
        break

X = int(''.join(map(str, B)), 2)

print(sum(map(lambda a: X ^ a, A)))
import math

if (X + Y) % 3 != 0:
    print(0)
    exit()

m = (2 * Y - X) / 3
n = (2 * X - Y) / 3
m = int(m)
n = int(n)

if m < 0 or n < 0:
    print(0)
    exit()

num = 1

for x in range(m + n, n, -1):
    num *= x

den = 1
for x in range(1, m + 1):
    den *= x

print(int(num / den) % MOD)


### FIXED CODE ###

import math
X, Y = map(int, input().split())

MOD = 1000000007


def combination(n, r):
    r = min(r, n - r)

    num = 1
    den = 1

    for i in range(1, r + 1):
        num = num * (n + 1 - i) % MOD
        den = den * i % MOD

    return num * pow(den, MOD - 2, MOD) % MOD


if (X + Y) % 3 != 0:
    print(0)
    exit()

m = (2 * Y - X) / 3
n = (2 * X - Y) / 3
m = int(m)
n = int(n)

if m < 0 or n < 0:
    print(0)
    exit()

print(int(combination(m + n, n)) % MOD)
A=str(input()

if A[0]==A[1] and A[1]==A[2]:
    print("No")
if A[0]!=A[1] or A[1]!=A[2]:
     print("Yes")

### FIXED CODE ###

# coding: utf-8
A=input()

if A[0]==A[1] and A[1]==A[2]:
    print("No")
if A[0]!=A[1] or A[1]!=A[2]:
     print("Yes")
A, B, C, D, E, F = [int(item) for item in input().rstrip().split(" ")]

mizu_arr = []
for i in range(F // (A*100) + 1):
    for j in range((F - i * A * 100) // (B*100) + 1):
        mizu = i * A * 100 + j * B * 100
        if mizu > 0:
            mizu_arr.append(mizu)

mizu_arr = sorted(mizu_arr)

def func(sato):
    min_mizu = sato * 100.0 / E
    max_mizu = F - sato
    for mizu in mizu_arr:
        if max_mizu < mizu:
            return None
        if min_mizu <= mizu:
            return mizu
    return None

max_nodo = 0
max_sato = (F // (100 + E)) * E
for i in range(max_sato // C + 1):
    for j in range((max_sato - i * C) // D + 1):
        sato = i * C + j * D
        mizu = func(sato)
        if not mizu == None:
            if 100 * sato / (mizu + sato) > max_nodo:
                ans = [mizu + sato, sato]
                max_nodo = 100 * sato / (mizu + sato)
              
print("{} {}".format(ans[0], ans[1]))

### FIXED CODE ###

A, B, C, D, E, F = [int(item) for item in input().rstrip().split(" ")]

mizu_arr = []
for i in range(F // (A*100) + 1):
    for j in range((F - i * A * 100) // (B*100) + 1):
        mizu = i * A * 100 + j * B * 100
        if mizu > 0:
            mizu_arr.append(mizu)

mizu_arr = sorted(mizu_arr)

def func(sato):
    min_mizu = sato * 100.0 / E
    max_mizu = F - sato
    for mizu in mizu_arr:
        if max_mizu < mizu:
            return None
        if min_mizu <= mizu:
            return mizu
    return None

max_nodo = 0
ans = [A*100, 0]
max_sato = (F // (100 + E)) * E
for i in range(max_sato // C + 1):
    for j in range((max_sato - i * C) // D + 1):
        sato = i * C + j * D
        mizu = func(sato)
        if not mizu == None:
            if 100 * sato / (mizu + sato) > max_nodo:
                ans = [mizu + sato, sato]
                max_nodo = 100 * sato / (mizu + sato)
              
print("{} {}".format(ans[0], ans[1]))
a, b = map(int, input().spkit())
ans = "error" if(a + b >= 10) else a + b
print(ans)


### FIXED CODE ###

a, b = map(int, input().split())
ans = "error" if(a + b >= 10) else a + b
print(ans)
# 入力
N,L = list(map(int, input().split()))
S = []
for _ in range(N):
    S.add(str(input()))

# 出力
print(''.join(sorted(S)))

### FIXED CODE ###

# 入力
N,L = list(map(int, input().split()))
S = []
for _ in range(N):
    S += [str(input())]

# 出力
print(''.join(sorted(S)))
import sys
import numpy as np


def read():
    return sys.stdin.readline().rstrip()


def main():
    h, w, m = map(int, read().split())
    target = [(0, 0) for _ in range(m)]
    row = np.zeros(h, dtype=int)
    col = np.zeros(w, dtype=int)
    for i in range(m):
        hi, wi = [int(i) - 1 for i in input().split()]
        target[i] = (hi, wi)
        row[hi] += 1
        col[wi] += 1
    r = row.max()
    ri = [i for i in range(h) if row[i] == r]
    c = 0
    for rii in ri:
        ci = col.copy()
        for y, x in target:
            if y == rii:
                ci[x] -= 1
        c = max(ci.max(), c)
    ans = r + c
    c = col.max()
    ci = [i for i in range(w) if col[i] == c]
    r = 0
    for cii in ci:
        ri = row.copy()
        for y, x in target:
            if x == cii:
                ri[y] -= 1
        r = max(ri.max(), r)
    ans = max(r + c, ans)
    print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys


def read():
    return sys.stdin.readline().rstrip()


def main():
    h, w, m = map(int, read().split())
    target = set()
    row = [0] * h
    col = [0] * w
    for _ in range(m):
        hi, wi = [int(i) - 1 for i in input().split()]
        target.add((hi, wi))
        row[hi] += 1
        col[wi] += 1
    row_max = max(row)
    r = [i for i in range(h) if row[i] == row_max]
    col_max = max(col)
    c = [i for i in range(w) if col[i] == col_max]
    for ri in r:
        for ci in c:
            if (ri, ci) not in target:
                print(row_max + col_max)
                return
    print(row_max + col_max - 1)


if __name__ == '__main__':
    main()
print('Yes' if len(set(input()))==2, 'No')

### FIXED CODE ###

print('Yes' if len(set(input()))==2 else 'No')
n, d = list(map(int, input().strip()))
cnt = 0
d2 = d**2
x, y = [], []
for i in range(n):
	tx, ty = list(map(int, input().strip()))
	x.append(tx)
	y.append(ty)

for i in range(n):
	if(x[i]**2 + y[i]**2 <= d2):
		cnt += 1
print(cnt)

### FIXED CODE ###

n, d = list(map(int, input().split()))
cnt = 0
d2 = d**2
x, y = [], []
for i in range(n):
	tx, ty = list(map(int, input().split()))
	x.append(tx)
	y.append(ty)

for i in range(n):
	if(x[i]**2 + y[i]**2 <= d2):
		cnt += 1
print(cnt)
n= int(input())
s= [input() for i in range(n)]
p=set(s)
p1=list(p)
N=len(s)
c=[0]*N
for i in range(N):
	c[i]=s.count(p1[i])
m =max(c)
c1=c.count(m)
ans =[]
for i in range(N):
	if c[i]==m:
		ans.append(p1[i])
ans1 = sorted(ans)
for i in range(c1):
	print(ans1[i])

### FIXED CODE ###

n= int(input())
s= sorted([input() for i in range(n)])
s.append("END")
ans=[]
max=-1
past=s[0]
c=1
for i in range(1,n+1):
	if past==s[i]:
		c+=1
	else:
		if c>max:
			max=c
			ans=[]
			ans.append(s[i-1])
		elif c==max:
			ans.append(s[i-1])
		c=1
	past=s[i]
for i in range(len(ans)):
	print(ans[i])
p=[2,3,4,5,6,7,8,9,10,11,12,13,1]
a,b=map(int,input().split())
print('ABloibc e'[p.index(a)<p.idex(b)::2] if a!=b else 'Draw') 

### FIXED CODE ###

p=[2,3,4,5,6,7,8,9,10,11,12,13,1]
a,b=map(int,input().split())
print('ABloibc e'[p.index(a)<p.index(b)::2] if a!=b else 'Draw')
N, M = map(int, input().split())
A = []

for _ in range(M):
    a = int(input())
    A.append(a)

d = {}


def f(x):
    if x in A:
        return 0
    if x > N:
        return 0
    if x == N:
        return 1

    if d.get(x):
        return d[x]

    if d.get(x + 1):
        x1 = d.get(x + 1)
    else:
        x1 = f(x + 1)
        d[x + 1] = x1

    if d.get(x + 2):
        x2 = d.get(x + 2)
    else:
        x2 = f(x + 2)
        d[x + 2] = x2

    ans = x1 + x2
    d[x] = ans
    return ans


print(f(0) % 1000000007)


### FIXED CODE ###

import sys

sys.setrecursionlimit(1000000)

N, M = map(int, input().split())
A = []
ANS = []
for i in range(N + 10):
    ANS.append(None)

for _ in range(M):
    a = int(input())
    A.append(a)
    ANS[a] = 0


def f(x):
    # print(ANS)
    # if x in A:
    #     print('::::', x)
    #     d[x] = 0
    #     return 0
    if ANS[x] is not None:
        return ANS[x]

    if x > N:
        return 0
    if x == N:
        return 1

    # if d.get(x + 1):
    #     x1 = d.get(x + 1)
    # else:
    #     x1 = f(x + 1)
    #     d[x + 1] = x1
    #
    # if d.get(x + 2):
    #     x2 = d.get(x + 2)
    # else:
    #     x2 = f(x + 2)
    #     d[x + 2] = x2

    # ans = x1 + x2
    ans = f(x + 1) + f(x + 2)
    ANS[x] = ans
    return ans


print(f(0) % 1000000007)
n=int(input())
#A=[]
#X=[]
#Y=[]
#for i in range(n):
 # a=int(input())
  #A.append(a)
  #x=[]
  #y=[]
  #for j in range(a):
    #x1,y1=[int(s) for s in input().split()]
    #x.append(x1)
    #y.append(y1)
  #X.append(x)
  #Y.append(y)
  
c=0
#for i in range(n):
 # l=[1]*n
  #for j in range(i, n-i):
   # if l[j]==0:continue
    #for k in range(A[j]):
    　#　l[X[j][k]] *= Y[j][k]
  #if c<l.count(1):
   # c=l.count(1) 
  
        
  
print(c)  
  
  
  
  
  
  
  
  
  
  
  
  
  

### FIXED CODE ###

n=int(input())
X=[]
Y=[]
A=[0]*n
for i in range(n):
  A[i]=int(input())
  a=A[i]
  x=[0]*a
  y=[0]*a
  for j in range(a):
    x[j],y[j]=[int(s) for s in input().split()]
  X.append(x)
  Y.append(y)
  
s=0
for i in range(2**n):
  c=0
  d=0
  B=[0]*n
  for j in range(n):
    if((i >> j) & 1):
      c=c+1
      B[j]=1
  for k in range(n):
    if B[k]==1:
      for j in range(A[k]):
        if Y[k][j]!=B[X[k][j]-1]:
          d=-1
          break
    if d<0:
      break
  if s<c and d==0:
    s=c
      
      
print(s)
# coding: utf-8
# Your code here!
ls = []
count = [0]*9
for i in range(3):
    ls.extend(input().split(' '))
for i in range(int(input())):
    s = input()
    if s in ls:
        i = ls.index(s)
        count[i]="1"
flag = 0
for i in range(3):
    if count[i] == count[i+3] == count[i+6]=="1":
        flag = 1
        break
if flag == 0:
	for i in range(0,8,3):
    	if count[i] == count[i+1] == count[i+2] == "1":
       		flag = 1
        	break
if count[0]==count[4]==count[8]=="1":
    flag = 1
if count[2] == count[4] == count[6] == "1":
    flag = 1
if flag == 1:
    print("Yes")
elif flag == 0:
    print("No")

### FIXED CODE ###

# coding: utf-8
# Your code here!
ls = []
count = [0]*9
for i in range(3):
    ls.extend(input().split(' '))
for i in range(int(input())):
    s = input()
    if s in ls:
        i = ls.index(s)
        count[i]="1"
flag = 0
for i in range(3):
    if count[i] == count[i+3] == count[i+6]=="1":
        flag = 1
        break
for i in range(0,8,3):
    if count[i] == count[i+1] == count[i+2] == "1":
        flag = 1
        break
if count[0]==count[4]==count[8]=="1":
    flag = 1
if count[2] == count[4] == count[6] == "1":
    flag = 1
if flag == 1:
    print("Yes")
elif flag == 0:
    print("No")
X = int(input())
A = 100
Y = 0
while A < X:
  A = int(y*1.01)
  Y += 1 
print(Y)

### FIXED CODE ###

X = int(input())
A = 100
Y = 0
while A < X:
  A += A//100
  Y += 1
print(Y)
r, g, b = int(input)
N = r*100 + g*10 + b

if N%4 == 0:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

r, g, b = map(int, input().split())
N = r*100 + g*10 + b

if N%4 == 0:
  print("YES")
else:
  print("NO")
import sys
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7

S = S()
T = S()

if len(S + 1) == len(T):
    for i in len(S):
        if S[i] != T[i]:
            print("No")
            sys.exit()
    print("Yes")

### FIXED CODE ###

import sys
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7

s = S()
t = S()

if len(s) + 1 == len(t):
    for i in range(len(s)):
        if s[i] != t[i]:
            print("No")
            sys.exit()
    print("Yes")
def gcd(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        return a
    else:
        return gcd(b, a%b);

def lcm(a, b):
    return a * b / gcd(a, b);

N = input()
V = 1
for i in range(int(N)):
    T = input()
    V = lcm(V, int(T));
print(int(V))

### FIXED CODE ###

def gcd(a, b):
    if a < b:
        a, b = b, a
    if b == 0:
        return a
    else:
        return gcd(b, a%b)

def lcm(a, b):
    return a // gcd(a, b) * b

N = input()
V = 1
for i in range(int(N)):
    T = input()
    V = lcm(V, int(T))

print(V)
x = map(float,input().split(' '))
a = x[0]
b = x[1]
c = x[2]
d = x[3]
e = x[4]
f = x[5]
g = (c*e-b*f)/(a*e-d*b)
h = (c*d-a*f)/(b*d-a*e)
print round(g,4),round(h,4)

### FIXED CODE ###

while True:
	try:
		a,b,c,d,e,f = map(float,raw_input().split(' '))
		p = round((c*e-b*f)/(a*e-b*d),4)
		q = round((a*f-c*d)/(a*e-b*d),4)
		x = '%.3f' % p
		y = '%.3f' % q
		if str(x) == '-0.000': x = '%.3f' % 0.000
		if str(y) == '-0.000': y = '%.3f' % 0.000
		print x,y
	except: break
n = int(input())
s = input()

if n % 2 != 0: return "No"
else :
  for i in range(n / 2):
    if a[i] != a[i + n / 2]: print "No"
  print "Yes"


### FIXED CODE ###

import sys


def work():
    n = int(input())
    s = sys.stdin.readline()
    if n % 2 == 1: print "No"
    else :
        for i in range(n / 2):
            if s[i] != s[i + n / 2]:
		print "No"
		return
	print "Yes"

work()