Problem:
 Score : 200 points    Problem Statement Given are a positive integer N and a string S of length N consisting of lowercase English letters.  Determine whether the string is a concatenation of two copies of some string.
That is, determine whether there is a string T such that S = T + T .      Constraints  1 \leq N \leq 100  S consists of lowercase English letters.  |S| = N         Input Input is given from Standard Input in the following format:  N  S       Output If S is a concatenation of two copies of some string, print Yes ; otherwise, print No .        Sample Input 1 6
abcabc      Sample Output 1 Yes  Let T =  abc , and S = T + T .       Sample Input 2 6
abcadc      Sample Output 2 No       Sample Input 3 1
z      Sample Output 3 No

Solution (Python):
n = int(input())
s = input()
m = int(n/2)
if n%2==0:
  if s[:m]==s[m:]:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Solution (Python):






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

if n % 2 == 1:
  print('No')

else:
  for i in range(n // 2):
    
    if not(s[i] == s[n // 2 + i]):
      print('No')
      exit(0)
  print('Yes')

Solution (Python):
n = int(input())
a = list(input())
if n % 2 != 0:
	print("No")
else:
	m = n//2
	a1,a2 = a[m:],a[:m]
	if (a1 == a2):
		print("Yes")
	else:
		print("No")

Solution (Python):
n=int(input())
s=input()
if n%2==1:print("No")
else:
  if s[:n//2]==s[n//2:]:
    print("Yes")
  else:print("No")

Solution (Python):
n = int(input())
S = input()
leng = len(S)

if leng % 2 == 1:
    print('No')
else:
    if S[:leng//2] == S[(leng//2):]:
        print('Yes')
    else:
        print('No')

Solution (Python):
N = int(input())
S = input()



if S[:int(N//2)] == S[int(N//2):]:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
S = input()
 
s = [ i for i in S]
flag = True
 
if N % 2 == 1:
    print("No")
    flag = False
else:
    for j in range(int(N/2)):
        if s[j] != s[j+int(N/2)]:
            print("No")
            flag = False
if flag:
    print("Yes")

Solution (Python):
N = int(input())
str_list = list(input())
str_list = [str_list[:N//2],str_list[N//2:]]
if str_list[0] == str_list[1]:
    print("Yes")
else:
    print("No")

Solution (Python):
a=int(input())
b=input()
if a%2==1:
  print("No")
  exit()
for i in range(a//2):
  if b[i]!=b[i+a//2]:
    print("No")
    exit()
print("Yes")

Solution (Python):
N, S = open(0).read().split()

n = int(int(N)/2)
print('Yes' if S[:n] == S[n:] else 'No')

Solution (Python):
n = int(input())
s = input()
if n%2 == 0:
  s0 = s[0:int(n//2)]
  if s0 == s[int(n//2):]:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Solution (Python):
n = int(input())
s = input()

if n%2 == 1:
    print("No")



elif s[0:int(n/2)] == s[int(n/2):]:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
s = input()
if n%2 != 0:
  print('No')
else:
  if s[:int(n/2)] == s[int(n/2):]:
    print('Yes')
  else:
    print('No')

Solution (Python):
n=int(input())
str=list(input())

if n%2==0:
    if str[:n//2]==str[n//2:]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):
n=int(input())
str=input()
if str[0:n//2] == str[n//2:n]:
  print("Yes")
else:
  print("No")

Solution (Python):
n = int(input())
s = str(input())

d = n // 2

if n % 2 == 1:
    print('No')
elif s[0:d] == s[d:n]:
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())
s = input()

if n % 2 != 0:
    print('No')
else:
    ans = True
    for i in range(int(n/2)):
        if s[i] != s[i + int(n/2)]:
            print('No')
            ans = False
            break
    if ans:
        print('Yes')

Solution (Python):
n = int(input())
s = input()

if n%2 != 0:
    print('No')
elif s[0:n//2]*2 == s:
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())
s = input()
n2 = int(n/2)

s1 = s[0:n2]
s2 = s[n2:n]

if s1 == s2:
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())
s = input()

if n % 2 == 1:
    print('No')
else:
    sli = int(n/2)
    before_s = s[:sli]
    after_s = s[sli:]
    if before_s == after_s:
        print('Yes')
    else:
        print('No')

Solution (Python):
N = int(input())
S = input()

if N % 2 != 0:
    print("No")
else:
    if S[:N//2] == S[N//2:]:
        print("Yes")
    else:
        print("No")

Solution (Python):
N = int(input())
S = input()

k=int(N/2)

if(S[0:k] == S[k:N]):
    print("Yes")
else:
    print("No")

Solution (Python):
n =int(input())
s = list(input())


a = int(n/2)
if n % 2 ==0 and s[:a] == s[a:]:
	print('Yes')
else:
	print('No')

Solution (Python):
n=int(input())
s=input()
d=list(s)
z=0
if n%2==0:
  for i in range(n//2):
    if d[i]==d[n//2+i]:
      z+=1
  if z==n//2:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Solution (Python):
n=int(input())
s=(input())

if n%2!=0:
	print("No")

else:
	if (s[:n//2])==(s[n//2:]):
		print("Yes")
	else:
		print("No")

Solution (Python):
import sys
n=int(input())
list=input()
if len(list)%2==1:
    print("No")
    sys.exit()
else:
    for i in range(0,int(n/2)):
        if list[i]==list[int(i+n/2)]:
            a=1
        else:
            print("No")
            sys.exit()
print("Yes")

Solution (Python):
N = int(input())
S = input()

N2= int(N/2)

FS = S[0:N2]
BS = S[N2:N]

if FS == BS:
  print('Yes')
else:
  print('No')

Solution (Python):
n = int(input().strip())
s = input().strip()
if n%2!=0:
    print("No")
elif s[:n//2]==s[n//2:]:
    print("Yes")
else:
    print("No")

Solution (Python):

N = int(input())
S = str(input())

if N % 2 == 0:
    if S[0:N // 2] == S[N // 2:N]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):
n = int(input())
s = input()

if n % 2 == 1:
	print("No")
elif s[:n//2] == s[n//2:]:
	print("Yes")
else:
	print("No")

Solution (Python):
n = int(input())

s = list(input())

hanbun = int(n / 2)

t1 = s[:hanbun]
t2 = s[hanbun:]

if t1 == t2:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys
input = sys.stdin.readline

_n = int(input())
_s = input()[:-1]


def chker(n, s):
    if n % 2 != 0:
        print('No')
        return

    hs = len(s) // 2
    ls, rs = s[:hs], s[hs:]
    if ls == rs:
        print('Yes')
    else:
        print('No')


chker(_n, _s)

Solution (Python):
n = int(input())
s = input()

ans = "No"

if n%2 == 0:
    if s[:n//2] == s[n//2:]:
        ans = "Yes"

print(ans)

Solution (Python):
N = int(input())
S = input()
n = int(N/2)

if len(S) % 2 == 0:
    if S[:n] == S[n:]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):
N = int(input())
S = input()
if N == 1:
  print("No")
  exit()
rep_cnt = N / 2
s1 = []
s2 = []
for i, s in enumerate(S):
  if i < rep_cnt:
    s1.append(s)
  else:
    s2.append(s)
if s1 == s2:
  print("Yes")
else:
  print("No")

Solution (Python):
n = int(input())
S = list(input())
S1 = []
for i in range(n // 2):
    s = S.pop(0)
    S1.append(s)
if n % 2 == 1 or S1 != S:
    print('No')
else:
    print('Yes')

Solution (Python):
N = int(input())
S = input()
if N%2==1:
    print("No")
    exit()
N //= 2
if S[:N] == S[N:]:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
S = input()

a = N//2

f = S[a:]
b = S[:a]

if f == b:
  print("Yes")
else:
  print("No")

Solution (Python):
n = int(input())
s = str(input())

t = s[:n//2]

if s == t + t:
    print("Yes")
else:
    print("No")

Solution (Python):
n=int(input())
s=list(input())
hantei=0
m=int(n/2)
if n%2==0:
	for i in range(m):
		if s[i]!=s[i+m]:
			hantei=1
			break
else:
	hantei=1
if hantei==0:
	print("Yes")
else:
	print("No")

Solution (Python):


N = int(input())
S = input()

if S == S[:int(len(S)/2)] + S[:int(len(S)/2)]:
    print("Yes")
else:
    print("No")

Solution (Python):


n = int(input())
s = input()
t = int(n/2)

if s[t:] in s[:t]:
    print('Yes')
else:
    print('No')

Solution (Python):
n=int(input())
s=str(input())

if not len(s)%2 == 0:
    ans="No"

else:
    l=int(len(s)/2)
    s1=str(s[:l])

    if s == s1 + s1:
        ans="Yes"
    else:
        ans="No"

print(ans)

Solution (Python):
N=int(input())
S=input()
a=0
n=int(N/2)
if N%2==0:
    for i in range(n):
        if S[i]!=S[i+n]:
            a=1
    if a==1:
        print('No')
    else:
        print('Yes')
else:
    print('No')

Solution (Python):
import sys
input = sys.stdin.readline

n=int(input())
s=input()
l=[]
m=[]
if n%2==1:
  print("No")
  sys.exit()
for i in range(n//2):
  l.append(s[i])
for _ in range(n//2,n):
  m.append(s[_])
print("Yes" if l==m else "No")

Solution (Python):
n = int(input())
s = input()

if s[:n//2] == s[n//2:]:
    print("Yes")
else:
    print("No")

Solution (Python):
import math

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

even = math.floor(n/2)

b=a[:even]
c=a[even:]

if b==c:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
S = input()

if N%2 !=0:
  print("No")
else:
  if S[0:N//2] == S[N//2:]:
    print("Yes")
  else:
    print("No")

Solution (Python):
N = int(input())
S = input()

if N%2 == 1:
  print('No')
else:
  for a,b in zip(S[:N//2],S[N//2:]):
    if a != b:
      print('No')
      exit()
  print('Yes')

Solution (Python):
n = int(input())
s = str(input())
t = int(n/2)

if n%2==1:
  print('No')
else:
  if s[:t]==s[t:]:
    print('Yes')
  else:
    print('No')

Solution (Python):
N = int(input())
S = list(input())

Flag = 0

if N % 2 == 0:
    if S[:N//2] == S[N//2:]:
        Flag = 1


if Flag == 1:
    print('Yes')
else:
    print('No')

Solution (Python):
n=int(input())
s=input()
if n%2==0:
  t=s[:n//2]
  if t+t==s:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Solution (Python):
def e(a):
    n=len(a)
    if len(a)%2!=0:
        return 'No'
    else:
        if a[:n//2]==a[(n//2):n]:
            return 'Yes'
        else:
            return 'No'
n=int(input())
a=input()
print(e(a))

Solution (Python):
N = int(input())
S = input()
flag = True
n = int(N/2)

if(N % 2) == 1:
    print('No')
else:
    for a in range(n):
        if not S[a] == S[n + a]:
            print('No')
            flag = False
            break
    if flag == True:
        print('Yes')

Solution (Python):
n = int(input())
s = input()

s1 = s[:int(n/2)]
s2 = s[int(n/2):]
if s1 == s2:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
S = input()


if S[:int(N/2)] == S[int(N/2):]:
	print("Yes")
else:
	print("No")

Solution (Python):
n = int(input())
s = input()
if n%2 == 0:
    if s[:int(n/2)]==s[int(n/2):]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):
N = int(input())
S = list(input())

if len(S)%2 != 0:
    print('No')

else:
    S1 = S[:len(S)//2]
    S2 = S[len(S)//2:]
    
    if S1 == S2:
        print('Yes')
    else:
        print('No')

Solution (Python):
n = int(input())
s = input()
if s[:int(n/2)] == s[int(n/2):]:
  print("Yes")
else:
  print("No")

Solution (Python):
a=int(input())
b=list(input())
count=0
if a%2==1:
    print("No")
else:
    for i in range(0,a//2,1):
        if b[i]!=b[i+a//2]:
            count+=1
    if count==0:
        print("Yes")
    else:
        print("No")

Solution (Python):
import sys
N = int(input())
S = input()

if N % 2 == 1:
    print("No")
    sys.exit()

if S[:N // 2] == S[N//2:]:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
s = input()
if (n % 2 == 0 and s[:n//2] == s[n//2:]):
  print("Yes")
else:
  print("No")

Solution (Python):
n = int(input())
s = input()
ls = list(s)
l1 = []
l2 = []
if n % 2 == 1:
    print('No')
else:
    for i in range(len(s)//2):
        l1.append(ls[i])
    for i in (range(len(s)//2, n)):
        l2.append(ls[i])
    if l1 == l2:
        print(('Yes'))
    else:
        print('No')

Solution (Python):

N = int(input())
S = input()

n = int(N/2)

A = ""

for i in range(n):
    A += S[i]



if S==A+A:
    print("Yes")
else:
    print("No")

Solution (Python):
l = int(input())
str = input()
if l % 2 != 0:
    print("No")
elif str[int(l/2):] == str[:int(l/2)]:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
s = input()

if n % 2 == 1:
    print("No")
elif s[:n // 2] == s[n // 2:]:
    print("Yes")
else:
    print("No")

Solution (Python):
num = int(input())
s = input()
flg=False
if num>1 and num%2==0:
    if s[:num//2] == s[num//2:]:
        flg=True
if flg:
    print('Yes')
else:
    print('No')

Solution (Python):
def main():
  n = int( input() )
  s = input()
  
  cnt = True
  
  if len(s) % 2 == 1:
    cnt = False
    
  for i in range( int(len(s)/2) ):
    if(s[i] == s[i + int(len(s)/2) ]):
      continue
    else:
      cnt = False
      
  if cnt == True:
    print("Yes")
  else:
    print("No")

if __name__ == '__main__': main()

Solution (Python):
n = int(input())
s = input()

if n%2 != 0:
    print('No')
    exit()
else:
    t = s[0:n//2]
    if s == t+t:
        print('Yes')
    else:
        print('No')

Solution (Python):
import re

N = int(input())

def check(s):
    return re.fullmatch(r"(.+?)\1", s)

if N % 2 == 0 and check(input()):
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
S = input()

if (S[:N // 2] == S[N // 2:]):
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
s = input()

if n % 2 == 0:
    s1 = s[:n // 2]
    if s1 == s[n // 2:]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):
n=int(input())
S=input()

if n%2==1:
  print('No')
else:
  k=int(n/2)
  if S[0:k]==S[k:n]:
    print('Yes')
  else:
    print('No')

Solution (Python):

import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def fi(): return float(input())
def mfi(): return map(float, input().rstrip().split())
def lmfi(): return list(map(float, input().rstrip().split()))
def li(): return list(input().rstrip())
def debug(*args, sep=" ", end="\n"): print("debug:", *args, file=sys.stderr, sep=sep, end=end) if not __debug__ else None
def exit(*arg): print(*arg); sys.exit()



def main():
    N = ii()
    S = li()
    flag = True
    if N % 2 == 1:
        exit("No")
    for i in range(N // 2):
        if S[i] != S[i + N // 2]:
            flag = False
    if flag:
        print("Yes")
    else:
        print("No")
    return


if __name__ == '__main__':
    main()

Solution (Python):

N = int(input())
S = input()

if N%2 == 1:
    print('No')
elif S[0:N//2] == S[N//2:]:
    print('Yes')
else:
    print('No')

Solution (Python):
n=int(input())
s=input()
if n%2!=0:
  print("No")
else:
  p=0
  for i in range(0,n//2):
    if s[i]!=s[i+n//2]:
      p=1
  if p==0:
    print("Yes")
  else:
    print("No")

Solution (Python):
import logging

logging.basicConfig(level=logging.INFO, format="%(message)s")


def main():
    N = int(input())
    S = input()
    logging.info("Hello!")

    if N % 2 == 1:
        print("No")
    else:
        half_S_1 = S[0:N // 2]
        logging.info(half_S_1)
        half_S_2 = S[N // 2:N]
        logging.info(half_S_2)

        if half_S_1 == half_S_2:
            print("Yes")
        else:
            print("No")
            
if __name__ == "__main__":
    main()

Solution (Python):
def main():
    N = int(input())
    S = input()

    if N % 2 != 0 or len(S) % 2 != 0:
        print("No")
        exit()

    for i in range(N//2):
        if S[i] != S[i+N//2]:
            print("No")
            exit()

    print("Yes")

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
s = input()
if s == s[:n//2]*2:
  print("Yes")
else:
  print("No")

Solution (Python):
n = int(input())
s = input()
st = s[0:int(n/2)]
nd = s[int(n/2):]
if st == nd:
    print('Yes')
else:print('No')

Solution (Python):
n = int(input())
s = input()

tmp = int(n / 2)

if s[0:tmp] == s[tmp:]:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
S = input()
if S[:int(N/2)] == S[int(N/2):]:
  print("Yes")
else:
  print("No")

Solution (Python):
N = int(input())
S = input()

flg = True
if N%2 == 0:
    for i in range(N//2):
        if S[i] != S[i+N//2]:
            flg = False
            break
else:
    flg = False
    
if flg:
    print("Yes")
else:
    print("No")

Solution (Python):
N=int(input())
S=list(input())

if S[:int(N/2)]==S[int(N/2):]:
  print("Yes")
else:
  print("No")

Solution (Python):
N = int(input())
S = input()

if N % 2 == 0:
    S1 = S[:int(N/2)]
    S2 = S[int(N/2):]

    if S1 == S2:
        print("Yes")
    else:
        print("No")

else:
    print("No")

Solution (Python):
n = int(input())
s = input()
if n%2 == 1:
    print('No')
elif s[0:n//2] == s[n//2:]:
    print('Yes')
else :
    print('No')

Solution (Python):
n=int(input())
s=str(input())

if n%2==1:
	print("No")
	
else:
	s1=s[0:int(n/2)]
	s2=s[int(n/2):n]
	
	
	if s1==s2:
		print("Yes")
	else:
		print("No")

Solution (Python):
N = int(input())
S = list(input())

center = int(N/2)

if S[:center] == S[center:]:
    print('Yes')
else:
    print('No')

Solution (Python):


n = int(raw_input())
s = raw_input()


if n % 2 == 0:
  r=s[0:n/2] == s[n/2:]
else:
  r=False
if r:
  print("Yes")
else:
  print("No")

Solution (Python):
import sys
n = int(input())
s = input()
if n%2 == 1:
    print("No")
else:
    for i in range(n//2):
        if s[i] != s[i+n//2]:
            print("No")
            sys.exit()
    print("Yes")

Solution (Python):
N = int(input())
S = input()
if N % 2 != 0:
  print('No')
  exit()
x = N // 2
for i in range(x):
  if S[i] != S[i + x]:
    print('No')
    exit()
print('Yes')

Solution (Python):
N=int(input())
S=input()
n=1
if N%2!=0:
  print("No")
else:
  for i in range(N//2):
    if not S[i]==S[i+N//2]:
      n=0
  if n:
    print("Yes")
  else:
    print("No")

Solution (Python):
n = int(input())
s = input()
sp = int(n/2)
s1 = s[:sp]
s2 = s[sp:len(s)]
print("Yes") if s1 == s2 else print("No")

Solution (Python):
N=int(input())
S=input()

if N%2==1:
    print("No")
    exit()

if S[:(N+1)//2]==S[N//2:]:
    result="Yes"
else:
    result="No"
print(result)

Solution (Python):

N = int(input())
S = str(input())

if(N % 2 == 0):
    if(S[: N//2] == S[N//2:]):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):
n=int(input())
s=input()
if n%2!=0:
  print('No')
elif s[0:n//2]==s[n//2:]:
  print('Yes')
else:
  print('No')

Solution (Python):
n = int(input())
s = input()
if n % 2 == 1:
    print('No')
else:
    t = int(n / 2)
    if s[:t] == s[t:]:
        print('Yes')
    else:
        print('No')

Solution (Python):
n=int(input())
s=input()
flag=1
if n%2==1:
  print('No')
else:
  for i in range(n//2):
    if s[i]==s[i+n//2]:
      flag*=1
    else:
      flag*=0
  if flag==1:
    print('Yes')
  else:
    print('No')

Solution (Python):
N = int(input())
S = input()

(d, m) = divmod(N, 2)

if m == 1:
  print("No")
else:
  for i in range(0, d):
    if S[i] != S[i+d]:
      print("No")
      break
  else:
    print("Yes")

Solution (Python):
n = int(input())
a = list(str(input()))

if a[0:int((n)/2)] == a[int((n)/2):n]:
	print("Yes")
else:
	print("No")

Solution (Python):
n = int(input())
s = input()

if n % 2 != 0:
    print("No")
    exit()

half = n // 2

for i in range(half):
    if s[i] != s[i+half]:
        print("No")
        exit()

print("Yes")

Solution (Python):
N = input()
S = input()
if len(S)%2 == 0 and S[:len(S)//2] == S[len(S)//2:]:
  print("Yes")
else:
  print("No")

Solution (Python):
def Echo():
    N = int(input())
    S = input()
    if S[:N // 2] == S[N // 2:]:
        print("Yes")
    else:
        print("No")


Echo()

Solution (Python):
n = int(input())
s = list(str(input()))

f = 0

if n % 2 == 0:
    for i in range(0,n//2):
        if s[i] == s[i+n//2]:
            pass
        else:
            f = 1
            break
else:
    f = 1

if f:
    print('No')
else:
    print('Yes')

Solution (Python):


n = int(input().strip())
s = input().strip()

if n % 2 == 1:
    print('No')
elif s[:n//2] == s[n//2:]:
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())
s = input()

if n%2 == 0:
  num = int(n/2)
  
  if s[:num] == s[num:]:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Solution (Python):
n = int(input())
s = list(map(str,input()))
ans = "Yes"
for i in range(n//2):
  if s[i] != s[i+n//2]:
    ans = "No"
    break
if n%2:
  ans = "No"
print(ans)

Solution (Python):
n = int(input())
str = input()

if n%2 == 0:
    if str[:int(n/2)] == str[int(n/2):]:
        print("Yes")
    else:
        print("No")
        
else:
    print("No")

Solution (Python):
n = int(input())
s = input()


s1 = s[0:int(n/2)]
s2 = s[int(n/2):n]

if(s1 == s2):
  print("Yes")
else:
  print("No")

Solution (Python):
import sys
input = sys.stdin.readline

N = int(input())
S = input()

if N % 2 != 0:
    print('No')
else:
    
    left = S[0: int((N / 2))]
    right = S[int((N / 2)): N]

    
    if left == right:
        print('Yes')
    else:
        print('No')

Solution (Python):
N = int(input())
S = input()

S1 = S[:int(N/2)]
S2 = S[int(N/2):]

if S1 == S2:
  print("Yes")
else:
  print("No")

Solution (Python):
n=int(input())
s=input()
if n%2==1:
  print("No")
else:
  for i in range(int(n/2)):
    if s[i]!=s[i+int(n/2)]:
      print("No")
      exit()
  print("Yes")

Solution (Python):
N = int(input())
S = str(input())

u = N//2

T1 = S[:u]
T2 = S[u:]

if T1 == T2:
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())
s = input()
tmp = n/2

if n % 2 != 0:
    print('No')
else:
    if s[:int(tmp)] == s[int(tmp):]:
        print('Yes')
    else:
        print('No')

Solution (Python):
import math
N = int(input())
S = input()
if N%2 == 1:
  print("No")
else:
  if S == S[:N//2]+S[:N//2]:
      print("Yes")
  else:
      print("No")

Solution (Python):
length=int(input())
s=input()
lens=len(s)
if(s[0:int(lens/2)] == s[int(lens/2):int(lens)]):
	print('Yes')
else:
	print('No')

Solution (Python):
N = int(input())
S = str(input())
S = list(S)

if N % 2 != 0:
    print('No')
else:
    S1 = S[:int(N/2)]
    S2 = S[int(N/2):]
    if S1 == S2:
        print('Yes')
    else:
        print('No')

Solution (Python):
n = input()
s = input()

half = int(n) / 2
test = s[0:int(half)]

if test == s[int(half):]:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
S = input()

if N % 2 == 0:
    num = int(N / 2)
    if S[0:num] == S[num:N]:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Solution (Python):

N = int(input())
S = input()
flag = False
if N % 2 == 0:
    a = N//2
    if S[0:a] == S[a:]:
        flag = True

if flag:
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
S = input()
flag = 0
for i in range(1,N):
    if S[:i] == S[i:]:
        flag += 1
if flag == 1:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
s = input()
if n % 2 != 0:
    print("No")
else:
    if "".join(list(s[:int(n/2)])) == "".join(list(s[int(n/2):])):
        print('Yes')
    else:
        print('No')

Solution (Python):
import sys 
input = sys.stdin.readline

N = int(input())
S = input()

if (N%2==1):
    print('No')
else:
    s = S[0:(N//2)]
    if S.count(s)==2:
      print('Yes')
    else:
      print('No')

Solution (Python):
N = int(input())
S = list(input())
before = ""
after = ""
if N % 2 != 0:
  print("No")
else:
  for i in range(N//2):
  	before += S[i]
  for j in range(N//2, N):
    after += S[j]
  if before == after:
    print("Yes")
  else:
    print("No")

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(N: int, S: str):
    if len(S)%2 == 1:
        print(NO)
    else:
        if S[:len(S)//2] == S[len(S)//2:]:
            print(YES)
        else:
            print(NO)



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    S = next(tokens)  
    solve(N, S)

if __name__ == '__main__':
    main()

Solution (Python):
N=int(input())
S=input()
T=N//2

if N%2==1:
  print('No')
else:
  if S[0:T]==S[T:N]:
    print('Yes')
  else:
    print('No')

Solution (Python):
def A():
    print(int(input())**2)

def B():
    length = int(input())
    s = str(input())
    if length%2 != 0 or s[:length//2]!=s[length//2:]:
        print('No')
    else:
        print('Yes')
B()

Solution (Python):
import sys
n = int(input())
s = input()
a = ""
b = ""
if n % 2 != 0:
  print("No")
  sys.exit()
else:
  for i in range(n):
    if i <= n / 2 - 1:
      a += s[i]
    else:
      b += s[i]
if a == b:
  print("Yes")
else:
  print("No")

Solution (Python):
N = int(input())
S = input()

if (N % 2 != 0):
	print('No')
else:
	halfN = int(N / 2)
	left = S[:halfN]
	right = S[halfN:]
	if (left == right):
		print('Yes')
	else:
		print('No')

Solution (Python):


DEBUG = 0

def calc(n,S):
    if n%2 == 1:return 'No'
    h = n//2
    pre = S[0:h]
    if DEBUG == 1:print(pre)
    lat = S[h:n]
    if DEBUG == 1:print(lat)
    if pre == lat: return 'Yes'
    else: return 'No'

n = int(input())
S = input()


print(calc(n,S))

Solution (Python):

from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

N = inp()
S = input()
if S[:N//2] == S[N//2:]:
    print("Yes")
else:
    print("No")

Solution (Python):
import sys
sys.setrecursionlimit(10**9)
INF=10**18
def input():
    return sys.stdin.readline().rstrip()

def main():
    N=int(input())
    S=list(input())
    if N%2==0:
        for i in range(N//2):
            if S[i]!=S[N//2+i]:
                print('No')
                break
        else:
            print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
s = input()

if n % 2 == 1 :
    print("No")
elif s[:n // 2] == s[n//2:n]:
    print("Yes" )
else:
    print("No")

Solution (Python):
n = int(input())
s = input()

a = int(n / 2)

if n % 2 != 0:
    print('No')
else:
    if s[:a] == s[a:]:
        print('Yes')
    else:
        print('No')

Solution (Python):

if __name__ == "__main__":
    N = int(input())
    S = input()
    if N % 2 == 1:
        print("No")
    else:
        if S[0:int(N/2)] == S[int(N/2):(N+1)]:
            print("Yes")
        else:
            print("No")

Solution (Python):
n = int(input())
s= input()
l = n//2
if n%2==1:
    print('No')
else:
    print('Yes' if s[:l]==s[l:] else 'No')

Solution (Python):
N=int(input())
S=input()

count=0
if(N%2==1):
    print("No")
else:
    flag=int(N/2)
    for i in range(0,flag):
        if(S[i]!=S[i+flag]):
            break
        else:
            count=count+1

    if(count==flag):
        print("Yes")
    else:
        print("No")

Solution (Python):
n=int(input())
s=input()

if((n/2) % 1 == 0 and s[:(n//2)] == s[n//2:]):
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
S = input()

if S[:int(len(S) / 2)] == S[int(len(S) / 2 ):] :
  print("Yes")
else:
  print("No")

Solution (Python):
N=int(input())
S=list(str(input()))
N_prime=int(N/2)
if N%2==1:
    print('No')
else:
    if S[0:N_prime]*2==S:
            print('Yes')
    else:print('No')

Solution (Python):
n = int(input())
s = str(input())
if(s == s[0:n//2] + s[0:n//2]):
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
S = input()

if N % 2:
    print('No')
    exit()

if S[0:N//2] == S[N//2:N]:
    print('Yes')
else:
    print('No')

Solution (Python):
r=int(input())
s=input()

sa=("".join(s[0:r//2]))
sb=("".join(s[r//2:r]))
if sa==sb:
  print("Yes")
elif r%2==1:
  print("No")
else:
  print("No")

Solution (Python):
import sys
n = int(input())
s = input()

if n % 2 == 1:
    print("No")
    sys.exit()

a = int(n/2)
if s[:a] == s[a:]:
    print("Yes")
else:
    print("No")

Solution (Python):
n = int(input())
s = input()

if n % 2 != 0 or s[:n//2] != s[n//2:]:
    print('No')
else:
    print('Yes')

Solution (Python):
n = int(input())
s = input()
if n%2 == 0 and s[:n//2] == s[n//2:]:
    print("Yes")
else:
    print("No")

Solution (Python):
N = int(input())
S = input()
Answer = 'No'
if N%2 == 0:
  if S[:int(N/2)]==S[int(N/2):]:
    Answer = 'Yes'
print(Answer)

Solution (Python):
N = int(input())
S = input()
if N % 2:
    print('No')
else:
    d = N // 2
    if S[:d] == S[d:]:
        print('Yes')
    else:
        print('No')

Solution (Python):
n = int(input())
s = input()

ans = 'Yes'
if n%2 == 1:
  ans = 'No'
else:
  for i in range(n // 2):
    if s[i] != s[i + n//2]:
      ans = 'No'
      break

print(ans)

Solution (Python):
N = int(input())
S = input()
if S[:(N//2)] == S[(N//2):]:
    print("Yes")
else:
    print("No")

Solution (Python):
ll = int(input())
s = input().strip()
if ll % 2 == 0:
    half = ll // 2
    
    
    if s[:half] == s[half:]:
        print('Yes')
        exit(0)
    
print('No')

Solution (Python):
N = int(input())
S = input()
if N%2 != 0:
  print('No')
else:
  if S[:(N//2)] == S[(N//2):]:
    print('Yes')
  else:
    print('No')

Solution (Python):
n = int(input())
s = input()
ans = s[0:int(len(s)/2)]
if 2*ans == s:
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())//2
S = input()
ans = "Yes "if S[:N] == S[N:] else "No"
print(ans)

Solution (Python):


import sys
import math

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        
        
        lines.append(input())
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    n = int(lines[0])
    s = lines[1]

    return (n, s)


def solve(n, s):

    result = 'No'
    if n % 2 != 0:
        return result
    
    m = n // 2

    a = s[:m]
    b = s[m:]
    
    if a == b:
        result = 'Yes'
        

    return  result


def main():
    
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Solution (Python):
n = int(input())
s = input()
if n % 2 == 0:
  if s[:n//2] == s[n//2:]:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Solution (Python):
n = int(input())
s = input()
if n % 2 == 1:
  print("No")
  exit()
for i in range(n//2):
  if s[i] != s[i+n//2]:
    print("No")
    exit()
print("Yes")

Solution (Python):

n = int(input())
S = input()  
len = len(S)
l2 = len // 2 
T1 = S[0:l2]
T2 = S[l2:len]
if T1 == T2: 
    print("Yes")
else: 
    print("No")

Solution (Python):
n = int(input())
s = input()
i = int(n / 2)
l = s[:i]
r = s[i:]

if l == r:
  print("Yes")
else:
  print("No")

Solution (Python):
n = int(input())
s = input()
if n % 2 == 1 or s[:n//2] != s[n//2:]:
    print('No')
else:
    print('Yes')

Solution (Python):
import sys
N = int(input())
S = input()
if S[len(S)//2:] ==S[:len(S)//2]:
    print('Yes')
else:
    print('No')

Solution (Python):
N = int(input())
S = input()
han_1 = ''
han_2 = ''
if N % 2 != 0:
    print('No')
else:
    n = int(N/2)
    
    for i in range(n):
        han_1 = han_1 + S[i]
    for i in range(n,N):
        han_2 = han_2 + S[i]

    if han_1 == han_2:
        print('Yes')
    else:
        print('No')

Solution (Python):
N = int(input())
s = input()

if(N%2!=0):
    print('No')
else:
    a = s[:N//2]
    b = s[N//2:]
    if(a==b):
        print('Yes')
    else:
        print('No')