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()
t = ""
for i in range(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==1:
  print("No")
else:
  n=int(N/2)
  if S[0:n]==S[n:N]:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import exit
def main():
  N = int(input())
  S = input()
  middle = int(N / 2)
  
  if middle == 0 or N % 2 != 0:
    print('No')
    exit()
  
  for i in range(middle):
    if S[i] != S[i + middle]:
      print('No')
      exit()
  
  print('Yes')
  
main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


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

Submission status: Accepted

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

Submission status: Accepted

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

if not ( 1 <= N <= 100 ): sys.exit()
if not S.islower(): sys.exit()
if not ( len(S) == N ): sys.exit()
if N % 2 == 1: print('No'); sys.exit()
print('Yes') if ( S[:N//2] + S[:N//2] == S ) else print('No')

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if N % 2 == 1:
    print('No')
    exit()
print('Yes' if S[:N//2] == S[N//2:] else '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(['No','Yes'][s[:n//2]==s[n//2:]])

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:]
  #print(s1,s2)
  if s1==s2:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if len(s)%2 ==1:
  print("No")
  exit()

s_h = s[:int((len(s)/2))]

s_h_2 = s[int((len(s)/2)):]


if s_h == s_h_2:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
n = int(input())
s = input()
x = n // 2
print(["Yes", "No"][n % 2 != 0 or s[:x] != s[x:]])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    S = str(input())
    if N % 2 == 1:
        print('No')
    elif N == 2:
        if S[0] == S[1]:
            print('Yes')
        else:
            print('No')
    else:
        n = (N // 2) - 1
        na = n + 1
        if S[0:n] == S[na:-1]:
            print('Yes')
        else:
            print('No')
main()

Submission status: Accepted

Solution code:
N=int(input())
S=str(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()
print('YNeos'[s[0:n//2]!=s[n//2:n]::2])

Submission status: Accepted

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

Submission status: Accepted

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

l_a = []
l_b = []

if n%2 == 0:
  for i in range(n//2):
    l_a.append(s[i])
  for i in range(n//2, n):
    l_b.append(s[i])
  if l_a == l_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 N%2 == 0:
    if S[0:N//2]==S[N//2:N+1]:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

if n%2==1:
    print("No")
else:
    n=n//2
    if s[:n]==s[n::]:
        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()
x = 0
if n % 2 == 0:
    for i in range(int(n / 2)):
        if s[i] == s[i + int(n / 2)]:
            x += 1
elif n == 1:
    x = 100000

if x == int(n / 2):
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if N % 2 == 0:
    T = N // 2
    if S[:T] == S[T:]:
        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:
  if s[: n // 2] == s[n // 2 :]:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

Solution code:
import sys

N=int(input())
S=input()
if(N%2==0 and S[0:N//2]==S[N//2:]):
  print("Yes")
  sys.exit()
print("No")

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if n % 2:
    print('No')
elif 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')
    quit()
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()

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

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

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:
#!/usr/bin/env python

import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**6)
INF = float("inf")

def main():
    N = int(input())
    S = input().decode().rstrip()

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

Submission status: Accepted

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

middle = len(S) // 2

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

Submission status: Accepted

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

if n % 2 == 1:
  print('No')
else:
  m = int(n/2)
  s1 = s[: m]
  s2 = s[m: ]
  
  if s1 == s2:
    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:
def main():
    N = int(input())
    S = input().rstrip()
    if N % 2 == 1:
        print("No")
    elif S[:int(N/2)] == S[int(N/2):]:
        print("Yes")
    else:
        print("No")


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if S[:int(N/2):] == S[int(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()
ans = "Yes"
if N % 2 != 0:
    ans = "No"
else:
    N = int(N/2)
    for i in range(0, N):
        if S[i] != S[i+N]:
            ans = "No"
            break
print(ans)

Submission status: Accepted

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

ans = 'No'

if len(S) % 2 == 0 and S[0:int(N/2)] == S[int(N/2):N]:
  ans = 'Yes'

print(ans)

Submission status: Accepted

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

if n % 2 != 0 :
    print("No")
else :
    t = ""
    for i in range(n//2):
        t += s[i]
    if s != t+t :
        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:
import sys
sys.setrecursionlimit(4100000)
import math
INF = 10**9

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
input()
s = input(); l = len(s)
if l % 2:
    print('No')
else:
    print('Yes' if (s[:(l//2)] == s[l//2:]) else  'No')

Submission status: Accepted

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

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:
a = int(input())
b = input()
c = a//2
if b[:c] == b[c:]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N=int(input())
S=list(input())
a1=[i for i in range(0,(N//2))]
a2=[i for i in range((N//2),N)]
a3=[S[i] for i in a1]
a4=[S[i] for i in a2]
print('Yes' if a3==a4 else 'No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
t = s[:n//2]
if s == t * 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('No')
else:
  print('Yes')

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
def gcd(*numbers): reduce(math.gcd, numbers)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0

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

Submission status: Accepted

Solution code:
N = int(input())

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

else:
    print("No")

Submission status: Accepted

Solution code:
import sys


# input = sys.stdin.readline

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
lst = [input() for i in range(2)]

n = int(lst[0])
s = lst[1]
t = ''

for i in range(n//2):
    t += s[i]

if n % 2 == 1:
    print('No')
elif t + t == s:
    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:
n=int(input())
s=input()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

n = int(input())
s = input()[:-1]

if n & 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()

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n=int(input())
s=input()
print('YNeos'[n%2>0 or s[:n//2]!=s[-(n//2):]::2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

compare_check = 0
if (len(s) <= 1) or ((len(s)%2) == 1) :
  print("No")
  sys.exit()
else:
  for i in range(len(s)//2):
    if (s[i] == s[i+len(s)//2]):
      compare_check += 1

if ((len(s)//2) == compare_check) :
  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:
if(int(input()) %2 == 1):
  print("No")
  exit()
t = input()
if(t[:len(t)//2] == t[len(t)//2:]):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

tmp1 = S[:int(N / 2)]
tmp2 = S[int(N / 2):]

if tmp1 == tmp2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

if N % 2 == 1:
  print("No")
  exit()
  
T_len = int(N / 2)
T1 = S[:T_len]
T2 = S[T_len:]

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

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N = int(readline())
    S = readline().strip()
    if N % 2 == 0 and S == S[: N // 2] * 2:
        print('Yes')
    else:
        print('No')

    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
S = input()
tmp1 = int(N / 2)
tmp2 = S[0:tmp1]
tmp3 = S[tmp1:]
flag = False

if tmp2 == tmp3:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
s=list(map(str,input()))
if n%2==0:
    num=int(n/2)
    Sx=s[0:num]
    Sy=s[num:n]
    if Sx==Sy:
      print("Yes")
    else:
      print("No")
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:
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()
if S[:N//2] ==S[N//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()
if n%2==1:
  print('No')
else:
  m = n//2
  print('Yes' if s[:m]==s[m:] else 'No')

Submission status: Accepted

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

Submission status: Accepted

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

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

print('Yes') if S[:N//2] == S[N//2:] 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()
pre = s[:n//2]
after = s[n//2:]
if n % 2 == 0 and pre == after:
	print('Yes')
else:
	print('No')

Submission status: Accepted

Solution code:
import os, sys, re, math

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if N%2==0 and all(a==b for a,b in zip(S,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==1:
  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')
else:
    half = N//2
    for i in range(half):
        if S[i]!=S[i+half]:
            print('No')
            break
    else:
        print('Yes')

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    s = input()
    tmp = 0
    if n%2 != 0:
        print("No")
        exit()
    for i in range(n//2):
        if s[i] != s[int(n/2)+i]:
            tmp += 1
    if tmp > 0:
        print('No')
    else:
        print('Yes')


    
    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#<B>
n = int(input())
s = input()
if s[:int(n/2)] == s[int(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[0:int(n/2)] == s[int(n/2):]: print("Yes")
  else: print("No")

Submission status: Accepted

Solution code:
import sys

def I(): return int(sys.stdin.readline().rstrip())
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし

N = I()
S = LS2()
S1 = [S[i] for i in range(N//2)]
S2 = [S[i] for i in range(N//2,N)]

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

Submission status: Accepted

Solution code:
n=int(input())
str=input()
before=str[0:int(0.5*n)]
after=str[int(0.5*n):]
if before==after:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
# 145 B

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

if len(s) % 2 == 0:
    x = len(s) // 2

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
s=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:
N = int(input())
S = list(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

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

Submission status: Accepted

Solution code:
n=int(input())
s=input()
if n%2==1:
    print("No")
    exit()
half=n//2
if 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()
half=n//2
if 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)

n = n // 2
a = s[:n]
if s.count(a) == 2:
    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]==s[n//2:]:
    ans='Yes'
print(ans)

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()
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')
    exit()
h = n // 2
a = s[:h]
b = s[h:n]
if a == b: print('Yes')
else: print('No')

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    n = int(input())
    s = list(input())
    if n % 2 == 1:
        print('No')
    else:
        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()
N = int(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 == 1:
  print('No')
else:
  print('Yes') if S[:N//2] == S[N//2:] else print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

mid= int(len(s)/2)
if s[:mid] == s[mid:]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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



if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
N=int(input())
S=list(input())
if 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 == 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 == 1 or n % 2 == 1:
    print('No')
    exit()
mid = n // 2
if s[:mid] == s[mid:]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

a = int(n/2)
t = s[0:a]
#print(t + t)

if n % 2 == 0:
    if s == str(t + t):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

flag=True

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

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

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:
n=int(input())
s=list(input())
Len=int(len(s)/2)
if len(s)%2==1:
  print('No')
else:
  for i in range(Len):
    if s[i]!=s[i+Len]:
      print('No')
      exit()
  print('Yes')

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 = input()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

N = int(input())
S = list(input())
n = N // 2

if N % 2 != 0 :
    print("No")
else :
    for i in range(n) :
        if S[i] != S[i+n] :
            print("No")
            sys.exit()
    print("Yes")

Submission status: Accepted

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

half_i = len(S) // 2

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

Submission status: Accepted

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

Submission status: Accepted

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