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



Sample input:
6
abcabc


Sample output:
Yes

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
length = int(input())
string = input()

if(length % 2 == 1):
    print('No')
else:
    key = 0
    for i in range(length // 2):
        if(string[i] != string[length//2 + i]):
            key = 1

    if(key == 0):
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution 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()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

t1 = s[:n//2]
t2 = s[n//2:]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
s=input()
print('YNeos'[s[:n//2]!=s[n//2:]::2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

if n%2 == 0:
    m = n//2

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

else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
b = list(input())
p=len(b)
c = b[p//2:]
d = b[:p//2]
if c == d:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 'No'
if N%2 == 0:
    first_half = S[:N//2]
    latter_half = S[N//2:]
    if first_half == latter_half:
        ans = 'Yes'

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
S = input()
s1 = list()
s2 = list()
if N % 2 == 1:
    print("No")
else:
    for i in range(N//2):
        s1.append(S[i])
    for i in range(N//2,N):
        s2.append(S[i])
    if s1 == s2:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

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

n_2 = int(n/2) 

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


elif s[:n_2] == s[n_2:]:
    print('Yes')

else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
t = int(input())
s = input()
if(s[0:t//2]==s[t//2:t]):
   print("Yes")
else:
   print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import itertools
import bisect
import math
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = input()
S1 = []
if N % 2 != 0:
    print('No')
    exit()
for i in range(N // 2):
    S1.append(S[i])

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

Submission status: Accepted

Solution code:
def run():
  N = int(input())
  S = input()
  if N%2 == 0:
    N //= 2
#    print(S, N)
    T = S[0:N]
    if T == S[N:]:
      print('Yes')
      exit()
  print('No')
  
if __name__ == '__main__':
  run()

Submission status: Accepted

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

ans = 'No'
if n % 2 == 0:
    mid = n // 2
    if s[:mid] == s[mid:]:
        ans = 'Yes'
        
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
S = input()
li = list(S)
n = int(len(li)/2)
half_li = list()
for i in range(n):
	half_li.append(li[i])
T = ''.join(half_li)
if S == T*2:
	print('Yes')
else:
	print('No')

Submission status: Accepted

Solution code:
n=int(input())
m=input()


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

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

Submission status: Accepted

Solution code:
length=int(input())
c=input()

if length==1:
    print("No")
elif length%2!=0:
    print("No")
else:
    a=''
    b=''

    for i in range(length//2):
        a+=c[i]
        b+=c[length//2 + i]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_num = int(input())
input_str = str(input())

if input_num % 2 == 0 and input_str[:input_num//2] == input_str[input_num//2:]:
    print ("Yes")
else:
    print ("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

flag = True
if n % 2 == 1:
    flag = False

for i in range(n//2):
    if s[i] != s[i + (n//2)]:
        flag = False
        break

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
one = ''
two = ''


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

else:
  for i in range(int(n/2)):
    one += s[i]
    two += s[i+int(n/2)]
  
  if one == two:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

Solution code:
n=int(input())//2
s=input()
print(("No","Yes")[s[:n]==s[n:]])

Submission status: Accepted

Solution code:
n=int(input())
s=input()
print(("No","Yes")[s[:n//2]==s[n//2:]])

Submission status: Accepted

Solution code:
N = int(input())
S = input()
a = S[0:N//2]
b = S[N//2:N]
if a == b:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
L = list(input())
a = int(N / 2)
if N%2 == 0:
    flag = 0
    for i in range(a):
        if L[i] != L[i+a]:
            flag = 1
    if flag:
        print("No")
    else:
        print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
from sys import stdin

n = int(stdin.readline().rstrip())
s = stdin.readline().rstrip()

if n%2 != 0:
    print('No')
else:
    for a,b in zip(s[0:],s[int(len(s))//2:]):
        if a == b:
            pass
        else:
            print('No')
            break
    else:
        print('Yes')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    n=int(input())
    if(n&1):
        print("No")
        return

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if N%2==1:
    print("No")
else:
    center = int(len(S)/2)
    if S == S[:center]*2:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
judge = 'Yes'
if n % 2 == 0:
    for i in range(int(n/2)):
        if s[i] != s[i + int(n/2)]:
            judge = 'No'
else:
    judge = 'No'
print(judge)

Submission status: Accepted

Solution code:
n=int(raw_input())
ch=raw_input()
if ch[:n//2]==ch[n//2:]:
        print('Yes')
else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

even =n//2

a = s[:even]
b = s[even:]

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

Submission status: Accepted

Solution code:
N = int(input())
S = str(input())
if N % 2 == 0 :
  if S[int(N/2):] == S[:int(N/2)] :
    print("Yes")
  else :
    print("No")
else :
  print("No")

Submission status: Accepted

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

n = N // 2

if S[:n] == S[n:]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

m=n//2
for i in range(m):
  if s[i]!=s[i+m]:
    print("No")
    exit(0)

print("Yes")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, *D, = [s.split() for s in open(0)]
N = int(N[0])
D = D[0][0]
if N%2 != 0:
    print("No")
elif N%2 == 0 and D[:int(N/2)] == D[int(N/2):]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
h = n // 2
if s[:h] == s[h:]:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = input()
S_list = list(S)
a = N // 2

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

Submission status: Accepted

Solution code:
s = int(input())
a = input()
if s % 2 == 1:
     print('No')
elif ''.join(list(a)[0:int(len(a)/2)]) == ''.join(list(a)[int(len(a)/2):]):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())

s = str(input())

m = n // 2

if s[:m] == s[m:]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input()) # length of string
str = input()
mid = n // 2 # the first char in later str
counter = 0
if n % 2 != 0:
  print("No")
else:
  for i in range(mid):
    if str[i] == str[mid + i]:
      counter += 1   
  if counter == mid :
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

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

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

print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=input()
s=input()
a=[]
b=[]
for i in range(len(s)//2):
    a.append(s[i])
for i in range(len(s)//2,len(s)):
    b.append(s[i])
if a==b:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N=int(input())
S=input()
N_harf=N//2
if S[:N_harf]==S[N_harf:]:
    print('Yes')
else:print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
s=input()
n=n//2

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N=int(input())
S=str(input())
 
if N%2==1:
  print('No');exit()
  
print('Yes' if S[0:N//2]==S[N//2:N] else 'No')

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

num =int(input())
alf =input()
if num%2==1:
  print("No")
  sys.exit()
l=num/2
for i in range(int(l)):
	if not alf[i]==alf[int(l)+i]:
		#print(alf[i])
		#print(alf[int(l)+i])
		print("No")
		sys.exit()
print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
N = int(input())
S = input()
print("Yes" if S[:N//2] == S[N//2:] else "No")

Submission status: Accepted

Solution code:
N=int(input())
S=[i for i in input()]
if N%2 == 1:
    print('No')
else:
    S_=S[:N//2]
    if S==S_+S_:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
#ABC-145-B
N = int(input())
S = input()
ans = ""
if N % 2 == 1:
    ans = "No"
half = N // 2
S1 = S[:half]
S2 = S[half:]

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

Submission status: Accepted

Solution code:
n = int(input())
string = input()
print("No" if n % 2 or string[:n // 2] != string[n // 2:] else "Yes")

Submission status: Accepted

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

Submission status: Accepted

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

S_tuple= S[:T],S[T:]
P=S_tuple[0]
Q=S_tuple[1]
if N%2!=0:
  print("No")
elif P==Q:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

le = len(s)
if le %2 != 0:
  print("No")
  exit()

st1 = s[:le//2]
st2 = s[le//2:]
if st1 == st2:
  print("Yes")
else:
  print("No")
  exit()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
l = int(input())
s = input()
h = l // 2
if l % 2 == 1:
  print("No")
else:
  flag = True
  for i in range(0, h):
    if s[i] != s[i + h]:
      flag = False
      break
  if flag:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
a = int(input())
string = input()

if a % 2 == 1:
  print("No")
else:
  
  left = string[0:a//2]
  right = string[a//2:a]
  
  if left == right:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Spyder Editor

This is a temporary script file.
"""

#a,b,c=map(int,input().split())
import sys
n=int(input())
s=input()
if n%2==1:
    print("No")
    sys.exit()
p=s[0:int(n/2)]
if p+p==s:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

s1 = S[:N//2]
s2 = S[N//2:]

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str

def solve(N: int, S: str):
    if N % 2 != 0:
        print(NO)
        exit()
    
    num = int(N/2)
    if S[:num] == S[num:]:
        print(YES)
    else:
        print(NO)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    S = next(tokens)  # type: str
    solve(N, S)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(string):
    n, s = string.split()
    n = int(n)
    return "Yes" if s[:n // 2] == s[n // 2:] else "No"


if __name__ == '__main__':
    print(solve('\n'.join([input(), input()])))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
s=input()
h=n//2
t=s[0:h]
te=s[h:n+1]
nun="No"
if n%2==0:
    if t==te:
        nun="Yes"
print(nun)

Submission status: Accepted

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

s_length = len(s)

if s[: s_length // 2] == s[s_length // 2:]:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

err = 0

if N % 2 ==1:
    err = 1
else:
    harf = int(N/2)
    for i in range(harf):
        if S[i] != S[i + harf]:
            err = 1

if err == 1:
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
S = str(input())
a, b = S[:N//2], S[N//2:]
if a==b:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys

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

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

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

print("Yes")

Submission status: Accepted

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

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

flag = True
for i in range(N // 2):
    if S[i] != S[i + N // 2]:
        flag = False

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

Submission status: Accepted

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

count = len(S)

if count % 2 == 0:
    T = S[: int(count/2)]
    S2 = T + T
    if S2 == S:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

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

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

else:
  print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

half=N//2

if S[:half] == S[half:]:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin


def fetch_one_line():
    return stdin.readline().rstrip()


def fetch_int_input():
    return [int(s) for s in fetch_one_line().split()]


def fetch_inputs(times):
    return [fetch_one_line() for _ in range(times)]


def fetch_int_inputs(times):
    return [[int(s) for s in fetch_one_line()] for _ in range(times)]

target_len = int(fetch_one_line())
target_str = fetch_one_line()

echo_result = ["Yes", "No"]
IS_REPEAT = 0
ISNT_REPEAT = 1
if target_len % 2 == 1:
    print(echo_result[ISNT_REPEAT])
else:
    half_len = int(target_len / 2)
    if target_str[:half_len] == target_str[half_len:]:
        print(echo_result[IS_REPEAT])
    else:
        print(echo_result[ISNT_REPEAT])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N=int(input())
S=input()
if N%2==1:
  print('No')
else:
  count=0
  for i in range(0,N//2):
    if S[i]==S[i+N//2]:
      count+=1
  if count==N//2:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

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


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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC145B - Echo
def main():
    N = int(input())
    S = input().rstrip()
    if N % 2 == 1:
        flg = False
    else:
        flg = S[: N // 2] == S[N // 2 :]
    print("Yes" if flg else "No")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

mid = int(N/2)

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

Submission status: Accepted

Solution code:

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

hN = int(int(N)/2)

S1 = S[:hN]
S2 = S[hN:]

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

def main():
    n_half = int(input()) // 2
    s = input().strip('\n')
    if n_half > 0 and s[0:n_half] == s[n_half:]:
        print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def p_b():
    n = int(input())
    s = input()
    if n & 1 == 1:
        print("No")
    else:
        if s[:n // 2] == s[n // 2:]:
            print("Yes")
        else:
            print("No")
            
p_b()

Submission status: Accepted

Solution code:
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")


def main():
    N = int(input())
    S = input()[:-1]
    if N%2==0 and S[:N//2] == S[N//2:]:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()