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

Submission status: Accepted

Solution code:
N = int(input())
s = input()
b=''
c=''
for i,d in enumerate(s):
    if i<=(N/2-1):
        b+=d
    else:
        c+=d
if c==b:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

half=int(N/2)

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

Submission status: Accepted

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

half_index = n // 2
right_index = n - half_index

if n == 1 or n % 2 == 1:
    print('No')
elif s[:half_index] == s[right_index:]:
    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())
S = str(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:
  m = int(n/2)
  if s[:m] == s[m:]:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc145/tasks/abc145_b
import sys
N = int(input())
S = list(input())
if N % 2 == 0:
    count = 0
    for i in range(N//2):
        if S[i] == S[N//2+i]:
            count += 1
    if count == N//2:
        print("Yes")
        sys.exit()
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:N]:
        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*-1):]: #割り算はintで囲まないとエラーになる
    print('Yes') 
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
s = input()
m = N // 2

if (N % 2 != 0 or (s[0:m] != s[m:])):
    print("No")
else:
    print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

i = int(N/2)

if S[:i]*2 == S:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

s1 = s[0:int(n/2)]
s2 = s[int(n/2):n]
if s1 == s2:
    print('Yes')
    exit()
print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

harf_num = int(input_num / 2)

t_1 = input_str[0: harf_num]
t_2 = input_str[harf_num:]
if t_1 == t_2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
n=int(input())
hn=n//2
tx=input()
tx1=tx[:hn]
tx2=tx[hn:]
#print(tx1,tx2)
if tx1==tx2:
    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!=0 or s[:n//2]!=s[n//2:]:
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

ans = 'No'

if (len(S) % 2 == 0):
  mid = len(S) // 2
  if (S[0:mid] == S[mid:]):
    ans = 'Yes'
print(ans)

Submission status: Accepted

Solution code:
N = int(input().strip())
S = input().strip()
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, s = [input() for i in range(2)]

a = int(int(n)/2)

if type(a) is int:
    if s[:a] == s[a:]:
        print("Yes")
    else:
        print("No")

#if type(a) is float:
    #print("No")

Submission status: Accepted

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

    if (N % 2) == 0:
        cnt = N // 2
        s1 = S[:cnt]
        s2 = S[cnt:]

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

ABC145B_Echo()

Submission status: Accepted

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


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

print("Yes")

Submission status: Accepted

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

if flag == 1:   print("Yes")
else:           print("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())//2
S=input()
print("Yes" if S[:n]==S[n:] 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())
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())

a=N//2
answer="Yes"

if N%2==1:
    print("No")
else:
    for i in range(a):
        if S[i]==S[i+a]:
            pass

        else:
            answer="No"
            break
    print(answer)

Submission status: Accepted

Solution code:
N = int(input())
S = input()
SS = list(S)
SSS = []
if N%2 != 0:
    print("No")
else:
    for i in range(int(N/2)):
        SSS.append(SS[i])
    SSS = "".join(SSS)
    SSS += SSS
    if SSS == S:
        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:
FLAG = False

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

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

half = int(N / 2)

if FLAG == False :
    for s in S :
        if half < N :
            half = half + 1

        if s is S[half - 1] :
            pass
        else :
            print("No")
            break

        if N == half:
            print("Yes")
            break

Submission status: Accepted

Solution code:
N = int(input())
S = 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:
i = int(input())
s = input()
n = i // 2
s1 = s[0:n]
s2 = s[n:i]

if((i % 2 == 0)and(s1 == s2)):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

if n % 2 == 1:
    print("No")
else:
    c = int(n/2)
    s_1 = s[:c]
    s_2 = s[c:n]

    if s_1 != s_2:
        print("No")
    else:
        print("Yes")

Submission status: Accepted

Solution code:
n = input()
s = raw_input()
if(n%2==1):
	print "No"
else:
	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:int(n/2)] != s[int(n/2):n]::2])

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def solve(s: str) -> bool:
  if len(s) % 2 == 1:
    return False
  if len(s) == 0:
    return True

  i = 0
  j = len(s) // 2
  while i < len(s) // 2:
    if s[i] != s[j]:
      return False
    i += 1
    j += 1
  return True


n = int(input().strip())
s = input().strip()
if solve(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:
def main():
    N = int(input())
    S = input()

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

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

    if flag:
        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 = list(str(input()))

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

if(N==2 and S[0]!=S[1]):
    print("No")
    sys.exit()

for x in range(0, N//2-1):
    if(S[x]!=S[N//2+x]):
        print("No")
        sys.exit()

print("Yes")

Submission status: Accepted

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

if N % 2 != 0:
    print('No')
else:
    #分ける
    part = S[0:int(len(S)/2)]
    if S[int(len(S)/2):] == part:
        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:
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

Solution code:
#ABC145-B Echo
N = int(input())
S = list(input())
if (N % 2 == 0) and (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==0:
	if s==s[:n//2]*2:
		print('Yes')
		exit()
print('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:
import sys
#input = sys.stdin.readline
sys.setrecursionlimit(10**7)
N = int(input())
S = input()

ss = S[:(len(S)//2)]
if ss+ss == S:
    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:
# B - Echo
# https://atcoder.jp/contests/abc145/tasks/abc145_b
n = int(input())
s = list(input())

def string_match(str):
    length = len(str)
    half = length//2
    fore_str = str[0:half]
    aft_str = str[half:]
    flg = True
    for i in range(0, half):
        if fore_str[i] != aft_str[i]:
            flg = False
            break
    return flg


if n % 2 != 0:
    flg = False
else:
    flg = string_match(s)

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

Submission status: Accepted

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

Submission status: Accepted

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

center=int(n/2)

if n%2==0 and s[:center] == s[center:]:
  print('Yes')
else:
  print('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:
from __future__ import print_function
# import numpy as np
# import numpypy as np
import sys
input = sys.stdin.readline

def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return

import math
import string
import fractions
from fractions import Fraction
from fractions import gcd

def lcm(n,m):
    return int(n*m/gcd(n,m))

import re
import array
import copy
import functools
import operator

import collections
import itertools
import bisect
import heapq


from heapq import heappush
from heapq import heappop
from heapq import heappushpop
from heapq import heapify
from heapq import heapreplace

from queue import PriorityQueue as pq

def reduce(p, q):
    common = fractions.gcd(p, q)
    return (p//common , q//common )
# from itertools import accumulate
# from collections import deque

import random


def main():
    n = int(input().strip())
    S = input().strip()
    eprint(S[0:n//2])
    if n%2!=0:
        print("No")
    else:
        if S[0:n//2]*2==S:
            print("Yes")
        else:
            print("No")
    return

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1000000000)
from itertools import count
from functools import lru_cache
from collections import defaultdict
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')
def meg(f, ok, ng):
    while abs(ok-ng)>1:
        mid = (ok+ng)//2
        if f(mid):
            ok=mid
        else:
            ng=mid
    return ok
#


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


main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

flag = 1

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

else:
    n = N//2

    for i in range(n):
        if S[i] != S[n+i]:
            flag = 0
            break

    print("Yes" if flag == 1 else "No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if(n%2 == 1):
    print("No")
else:
    flag = False
    for i in range(n//2):
        if(s[i] != s[i+n//2]):
            flag = True
            print("No")
    
    if(flag == False):
        print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

    if S1 == S2:
      print('{}'.format('Yes'))
    else:
      print('{}'.format('No'))

samestring()

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:
from sys import stdin

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

if N%2 != 0:
    print('No')
else:
    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())
cen=N//2
be=S[:cen]
af=S[cen:]
if be==af:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

if n % 2 == 1:
    print("No")
else:
    t = s[0:(n//2)]
    
    if s == t*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()
a = []
b = []
count = 1
for i in s:
  if count > (n/2):
    a.append(i)
  else:
    b.append(i)
  count += 1
if a == b:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac
import fractions
from functools import reduce
from operator import mul
import bisect
import sys
import logging
import heapq
import itertools

logging.basicConfig(level=logging.ERROR)

input = sys.stdin.readline

setrecursionlimit(1000000)


def main():
	n = int(input())
	s = input()[:-1]
	if(n%2==1):
		print('No')
		return
	print('Yes' if s[:n//2]==s[n//2:] else 'No')

def factorization(n):
	if n<2:
		return []

	arr = []
	temp = n
	for i in range(2, int(-(-n**0.5//1))+1):
		if temp%i==0:
			cnt=0
			while temp%i==0:
				cnt+=1
				temp //= i
			arr.append([i, cnt])

	if temp!=1:
		arr.append([temp, 1])

	if arr==[]:
		arr.append([n, 1])

	return arr

def cmb(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(numbers):
	return reduce(fractions.gcd, numbers)

def lcm(numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

class PriorityQueue():
	def __init__(self):
		self.queue = []
	def push(self,i):
		heapq.heappush(self.queue,-i)
	def pop(self):
		return -1 * heapq.heappop(self.queue)
	def sum(self):
		return -sum(self.queue)

main()

Submission status: Accepted

Solution code:
N = int(input())
S = input()
sList = list(S)
s1 = ""
s2 = ""
halfN = int(N / 2)
if N % 2 == 0:
    for i in range(halfN):
        s1 = s1 + sList[i]
        s2 = s2 + sList[halfN + i]
    if s1 == s2:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
S = input()
S_list = list(S)
if N%2 == 0:
    first_s = ','.join(S_list[0:int(N/2)]) 
    last_s =  ','.join(S_list[int(N/2):int(N)]) 
    if first_s == last_s:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
words = list(input())
if(len(words) % 2 == 1 ):
    print("No")
else:
    center = int(len(words) / 2)
    words_f = words[:center]
    words_b = words[center:]
    if(words_f == words_b):
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
N=int(input())
S=input()
if N%2!=0:
  print("No")
else:
  half=N//2-1
  T1=[]
  T2=[]
  for i in range(half+1):
    T1.append(S[i])
  for j in range(half+1,len(S)):
    T2.append(S[j])
  if T1==T2:
      print("Yes")
  else:
      print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

hoge = list(S)
fuga = []
for i in range(0, int(N) // 2):
    fuga.append(hoge[i])

if ''.join(fuga) + ''.join(fuga) == S:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():

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

    if n%2 == 1:
        return 'No'
    
    if s[:n//2] == s[n//2:]:
        return 'Yes'
    return 'No'

if __name__ == "__main__":
    print(main())

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

Submission status: Accepted

Solution code:

N = int(raw_input())
S = raw_input()

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

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:n]:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())
s = [i for i in 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 = input()
row = input()
unit1, unit2 = row[:len(row)//2], row[len(row)//2:]
if unit1 == unit2:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())
t = [i for i in input()]

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

Submission status: Accepted

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

if N%2:
  print("No")
  exit()
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:n]:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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