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()
A=S[:N//2]
B=S[N//2:]
if A==B:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

def main():
    N = int(input())
    S = input().strip()

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


if __name__ == "__main__":
    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()

b1,b2="",""

if N%2==1:
    print("No")
    exit()
else:
    for i in range(int(N/2)):
        b1=b1+S[i]
        b2=S[(len(S)-1)-i]+b2
if b1==b2:
    print("Yes")
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 = str(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

def is_echo(txt:str):
    if len(txt) % 2 != 0:
        return False
    tmp = int(len(txt) / 2)
    return txt[0:tmp] == txt[tmp:]


n = int(input().rstrip())
print("Yes" if is_echo(input().rstrip()) else "No")

Submission status: Accepted

Solution code:
N = int(input())

S = input()

S_list_one = list(S)
S_list_two = list(S)

a = int(N/2)
del S_list_one[a:]
del S_list_two[:a]

if(S_list_one == S_list_two):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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()
if n >= 2 and n % 2 == 0:
    half = s[:n//2]
else:
    print('No')
    exit()

if half * 2 == s:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
T = input()
l = T[:int(len(T) / 2)]
m = T[int(len(T) / 2):]
if l == m:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import re

N = input()
S = input()

m = re.fullmatch(r"(.+)\1", S)
if m:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

a = n//2
p = ''
for i in range(a):
  p += s[i]

if p+p == s:
  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 = str(input())

q = n % 2
w = int(n / 2)
if q == 0:
    x = s[:w]
    y = s[w:]
    if x == y:
        print('Yes')
        exit()

print('No')

Submission status: Accepted

Solution code:
n=int(input())
s=list(input())
ans="No"
if n%2==1:
  print(ans)
  exit()
form=[s[i] for i in range(n//2)]
latt=[s[i+n//2] for i in range(n//2)]
if form==latt:
  ans="Yes"
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
S = input()
S = [i for i in S]
cnt = 0
K = int(N/2)

if N%2==0:
    for i in range(0, K):
        if S[i]!=S[i+K]:
            cnt += 1
elif N%2==1:
    cnt += 1

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

Submission status: Accepted

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

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

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

print('Yes')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
ing_total = 0
N = int(n/2)
if n % 2 == 1:
    print("No")
else:
    for i in range(N):
        if s[i] == s[i+N]:
            ing_total +=1
        else:
            ing_total += 0
    if N == ing_total:
        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[i+N//2]):
            print("No")
            exit()
    print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
S = list(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=input()
if N%2==0:
  if S[:int(N/2)]==S[int(N/2):]:
    print("Yes")
    exit()
print("No")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 12 01:49:19 2020

@author: Kanaru Sato
"""

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

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

Submission status: Accepted

Solution code:
def solve():
    N = int(input())
    S = input()
    if N % 2 == 1:
        return 'No'
    a = S[:N//2]
    b = S[N//2:]
    return 'Yes' if a == b else 'No'

print(solve())

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if n % 2 == 0:
  a = n // 2 - 1
  if s[0:a+1] == s[(a+1):(n+1)]:
    print('Yes')
    exit()

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('No')
else:
    print('Yes')

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    s = list(input())
    if n % 2 != 0:
        print("No")
    else:
        if n == 2:
            if s[0] == s[1]:
                print("Yes")
            else:
                print("No")
        else:
            div = n // 2
            if s[:div-1] == s[div:n-1]:
                print("Yes")
            else:
                print("No")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

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

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

Submission status: Accepted

Solution code:
# Problem B - Echo

# input process
N = int(input())
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N=int(input())
S=input()
ans=S[N//2:]

print('Yes') if(N!=1 and S==(ans*2)) else print('No')

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if N%2 ==1:
  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:
def main():
    N = int(input())
    S = input()
    half = N // 2
    if N % 2 != 0:
        print('No')
    else:
        if S[:half] == S[half:]:
            print('Yes')
        else:
            print('No')
    

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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


if n%2==0 :
    for i in range(int(n/2)):
        if(s[i] != s[i+int(n/2)]):
            print('No')
            sys.exit()
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

def judge():
  if n%2 != 0:
    return "No"
  m = n//2
  for i in range(0, m):
    if s[i] != s[m+i]:
      return "No"
  return "Yes"

print(judge())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

    flag = False

    for i in range(N):
        T1 = S[:i]
        T2 = S[i:N]

        if(T1 == T2):
            flag = True
            #print('Yes')
            break

        # print(T1)
        # print(T2)
    if(flag):
        print('Yes')
    else:
        print('No')
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n=int(input())
s=input()
tmp = s[0:(n//2)]
if s ==tmp+tmp:
    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:
def judge(S, N):
    if N % 2 != 0:
        return 'No'
    if S[:N//2] == S[N//2:]:
        return 'Yes'
    else:
        return 'No'


N = int(input())
S = input()
print(judge(S, N))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools
import math
import sys
import heapq
from collections import Counter
from collections import deque
from fractions import gcd
from functools import reduce
sys.setrecursionlimit(4100000)
from functools import lru_cache
INF = 1 << 60

#ここから書き始める
n = int(input())
s = 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:
N=int(input())
S = str(input())
x = N//2
T = S[:x]
if S == 2*T:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
_, S = input(), input()
l = len(S)
print("Yes" if S[:l // 2] == S[l // 2:] else "No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
digits = int(input())
str = input()

num = int(digits/2)

str_forward = str[num:]
str_backward = str[:num]


if str_forward == str_backward:
 print("Yes")
else:
 print("No")

Submission status: Accepted

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


if len(s) % 2 == 0:
    if s[0:n//2] == s[n//2:n]:
        print('Yes')
        exit()

print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

len = n//2
if s == s[:len]*2:
    ans = "Yes"
else:
    ans = "No"

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

flag=0
if N%2==0:
    for i in range(N//2):
        if S[i]==S[i+N//2]:
            continue
        else:
            flag=1

else:
    flag=1

if flag==0:
    print("Yes")
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()
if len(s) % 2 == 1:
  print("No")
elif s[:len(s)//2]==s[len(s)//2:]:
  print("Yes")
else:print("No")

Submission status: Accepted

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

if n%2:print("No");exit()
else:mid = n//2

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
 
def exec(n, s):
  r = 'No'
  if n % 2 != 0:
    return r
  hs = s[0:int(n/2)]
  if hs + hs == s:
    r = 'Yes'
  return r
    
    
if __name__ == '__main__':
  r = [input(), input()]
  n = int(r[0])
  s = r[1]
  print(exec(n, s))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import math
#a,b= map(int,input().split())
#li= [int(x) for x in input().split()]
a=int(input())
S=input()
x=0
if a%2==1:
  print("No\n")
  sys.exit()
for i in range((len(S)//2)):
  if S[i]!= S[i+len(S)//2]:
    print("No\n")
    sys.exit()
print("Yes\n")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if n==1 or n%2 != 0:
  print("No")
  quit()
else:
  if 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())
if n % 2 == 1:
    print('No')
    exit()
s = input()
t = s[:n // 2]
if s == t + t:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

def test(N, S):    
    if N==1:
        print('No')
        return
    
    T1 = S[:int(N/2)]
    T2 = S[int(N/2):]
    if(T1==T2):
        print('Yes')
    else:
        print('No')
    return
  
test(N, S)

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()
m=int(n/2)

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

Submission status: Accepted

Solution code:
n = int(input())
s = list(input())
i = 0
l = []
while i < n / 2:
  l.append(s[i])
  i += 1
if l * 2 == s:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
from sys import stdin

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

a = s[:int(n/2)]
b = s[int(n/2):]

if (n % 2 == 0) and (a == b):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
a=int(input())
b=input()
c=int(a/2)
if a%2==0 and b[:c]==b[c:]:
	print("Yes")
else:print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

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

ans = 0

if (len(s) % 2) == 1:
    ans = 1
else:
    length = int(len(s)/2)
    for i in range(length):
        if s[i] != s[i + length]:
            ans = 1
            break

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

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if N % 2 == 0:
    for i in range(N//2):
        if S[i] != S[i+(N//2)]:
            print("No")
            exit()
if N % 2 == 1:
    print("No")
    exit()
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 = int(input())
S = input()
halfN = int(N / 2)
#print(halfN)
#print(S[0:halfN])
#print(S[halfN:N])

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

Submission status: Accepted

Solution code:
# coding: utf-8

def get_ans():
    n = int(input().rstrip())
    s = input().rstrip()

    if n % 2 != 0:
        return False

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


print("Yes" if get_ans() else "No")

Submission status: Accepted

Solution code:
#import math
#import bisect
#import numpy as np
#import itertools
#import copy
import sys

ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)

def main():
    n = int(input())
    s = input()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if n%2:
    print('No')
else:
    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 = 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 = input()
print("YNeos"[not(s[0:n//2] == s[n//2:n] and n % 2 == 0)::2])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num=int(input())
str=input()

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

Submission status: Accepted

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

Submission status: Accepted

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

l = len(S)

if S[:l//2] == S[l//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:
#!/usr/bin/env python3

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n=int(input())
s=input()
if n%2:
  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(str(input()))
if n%2!=0:
            print('No')
elif len(set(s[:n//2]))!=len(set(s[n//2:])):
            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="No"
if n%2==0 and s[:n//2]==s[n//2:]:
    ans="Yes"
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

S = input()

if N % 2 !=0:
  print("No")
elif 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')
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: print("No")
else:
    if s[:n//2] == s[n//2:]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
n = int(input())
word = str(input())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
#a = list(map(int,input().split()))

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if num%2 == 1:
  print("No")
  
elif num%2 == 0:
  judge = "Yes"
  for i in range(0,num//2):
    if not s[i] == s[num//2 + i]:
      judge = "No"
      break
    
  print(judge)

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

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

target = s[0:n//2]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 7)
read = sys.stdin.buffer.read 
input = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines  

N = int(input())//2
S = input().rstrip().decode()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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()
ans = "No"
if n % 2 == 0:
    ans = "Yes"
    for i in range(n // 2):
        if s[i] != s[n // 2 + i]:
            ans = "No"
            break
print(ans)

Submission status: Accepted

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

if n % 2 != 0:
  print("No")
else:
  c = int((n / 2) + 1)
  p = s[:c-1]
  
  if s.count(p) == 2:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main(n,s):
    if len(s) % 2 != 0:
        return False
    if s[int(n/2):] != s[:int(n/2)]:
        return False
    return True

n = int(input())
s = input()
print("Yes" if main(n,s) else "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())//2
s=input()
print('Yes'if s[:n]==s[n:]else'No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
S=input()
count=0
if N%2==0:   
    M=int(float(N/2))
    for i in range(M):
       if S[i]==S[M+i]:
           count=count
       else:
           count=count+1
else:
    count=count+1
if count>0:
    print('No')
else:
    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 = int(input())
S = input()

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

Submission status: Accepted

Solution code:
N = int(input()) 
S = input()
def is_even(num):
    if num % 2 == 0:
        return True
    else:
        return False
if is_even(N):
  if S[:N//2] == S[N//2:]:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Accepted

Solution code:
n = int(input())
 
s = str(input())
 
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!=0:
    print("No")
else:
    ans=0
    for i in range(int(n/2)):
        if s[i] != s[i+int(n/2)]:
            ans += 1
    if ans == 0:
        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 == 1:
    result = "No"
else:
    result = "Yes"
    n = int(n/2)

    for i in range(n):
        if s[i] == s[i + n ]:
            next
        else:
            result = "No"
            break

print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
moji = input()
res = 'Yes'
if n % 2 == 1:
    res = 'No'
else:
    for i in range(int(n/2)):
        if moji[i] != moji[int(n/2)+i]:
            res = 'No'
            break
      
print(res)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

def onaji(s):
    while True:
        if len(S)%2==1:
            return 'No'
        for i in range(len(S)//2):
            if S[i]!=S[i+(len(S)//2)]:
                return 'No'
            else:
                continue
        return 'Yes'
        
print(onaji(S))

Submission status: Accepted

Solution code:
n=int(input())
s=input()
if n%2==1:
  print('No')
else:
  s1=''
  s2=''
  for i in range(n):
    if i<n//2:
      s1+=s[i]
    else:
      s2+=s[i]
  if s1==s2:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

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