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,a=open(0);n=int(n);print("YNeos"[a[:n//2]!=a[n//2:-1]::2])

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

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()
total=0

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

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

else:
    T = ""
    m = int(N/2)
    for i in range(m):
        T += S[i]

    if T+T in S:
        print("Yes")

    else:
        print("No")

Submission status: Accepted

Solution code:
n = int(input())
s = list(input())
    
t1 = s[:n//2]
t2 = s[n//2:]

count = 0
for  i in range(n//2):
    if t1[i] == t2[i]:
        count += 1
if count == n//2 and  n%2==0:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())

S = input()

length = len(S)

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

    half = int(length / 2)

    if S[0:half] == S[half:]:
        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:
# B - Echo
N = int(input())
S = str(input())

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

Submission status: Accepted

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

    if flag == 1:
        print("No")
    else:
        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] == s:
        ans = "Yes"
    else:
        ans = "No"
else:
    ans = "No"

print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
S = input().rstrip()
 
if N%2==0:
  s1 = S[:(N//2)]
  if S == s1 + s1:
    print('Yes')
  else:
    print('No')
else:
  print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

import sys
sys.setrecursionlimit(300000)

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

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if n%2 == 1:
    print("No")
elif 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:
    ans = "No"
else:
    n = int(N/2)
    s1 = S[0:n]
    s2 = S[-n:]
    if s1 == s2:
        ans="Yes"
    else:
        ans ="No"
print(ans)

Submission status: Accepted

Solution code:
import sys
N = int(input())
# S = list(map(str,input().split()))
S = list(input())
if N % 2 == 0:
	T_1 = S[:int(len(S)/2)]
	T_2 = S[int(len(S)/2):]
	# print(T_1)
	# print(T_2)
	for i in range(len(T_1)):
		if T_1[i] != T_2[i]:
			print("No")
			sys.exit()	
	print("Yes")
	sys.exit()
else:
	print("No")

Submission status: Accepted

Solution code:
N = int(input())
s = list(input())
#print(s[:int(N/2)],s[int(N/2):])

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

Submission status: Accepted

Solution code:
import numpy as np

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

if n == 1:
    print("No")
    quit()

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

for i in range(int(n / 2)):
    if not s[i] == s[i + int(n / 2)]:
        print("No")
        quit()

print("Yes")

Submission status: Accepted

Solution code:
N = int(input())

S = input()

if N % 2 == 1: 
    print('{}'.format('No'))
    exit()

mid = N // 2
if S[ : mid] == S[mid : ]:
    print('{}'.format('Yes'))
else:
    print('{}'.format('No'))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

S = str(input())

char_list = list(S)

a = str(char_list[0])
n = int(N / 2)
b = str(char_list[n])

for i in range(1,n):
    a = str(a + char_list[i])
    b = str(b + char_list[i + n])

if((a == b) and (N % 2 == 0)):
    print("Yes")
elif((a != b) or (N % 2 != 0)):
    print("No")

Submission status: Accepted

Solution code:
len = int(input())
str = input()
flag = True

if len % 2 == 1:
  flag = False
else:
  for i in range(int(len//2)):
    if str[i] != str[i + int(len // 2)]:
      flag = False

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def SsSl(): return list(map(lambda x: x, input()))

n = int(input())
#List = [s for s in input().split()]
List = SsSl()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Ns = int(N/2)
flag = 0

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

Submission status: Accepted

Solution code:
n = int(input())

s = input()

ans = ''
if n % 2 == 1:
  ans = 'No'
else:
  ss = s[0:n//2]
  if ss + ss == s:
    ans = 'Yes'
  else:
    ans = 'No'

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

s1 = s[0: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==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() 
b = int(N/2)


if N % 2 == 0:
  s1 = s[0:b]
  s2 = s[b:N]

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

Submission status: Accepted

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

Submission status: Accepted

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

  if n % 2 is 0 and s[:int(n/2)] == s[int(n/2):]:
    return "Yes"

  return "No"

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

Submission status: Accepted

Solution code:
s = int(input())

n = list(map(str,input()))

ans = int(0)
D = int(s%2)
S = int(s/2)

for i in range(S):
  if n[i] == n[S+i]:
    ans += 1
    
if ans == S and D != 1:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
# B - Echo
n = (int)(input())
s = input()

flg = False

for i in range(1, n):
    str = s[:i]
    if s == (str + str):
        flg = True
        break

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

Submission status: Accepted

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

s1, s2 = S[:(N//2)], 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()
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[0:N//2]*2 == S:
    print('Yes')
else :
    print('No')

Submission status: Accepted

Solution code:
def seigi(s):
  lens = len(s)
  if lens%2==1:
    return "No"
  lensp2 = int(lens/2)
  for si in range(lensp2):
    if s[si] != s[si + lensp2]:
      return "No"
  return "Yes"
  
r = input()
s = input()
print(seigi(s))

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

Submission status: Accepted

Solution code:
N=int(input())
S = list(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()
check = False
for mojisu in range(1, N):
    if(S[0:mojisu]+S[0:mojisu]) == S:
        check = True

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if (n != len(t)):
	print("No")
else:
	nHalf = int(n / 2)

	if (nHalf == 1 and n != 2):
		print("No")
	elif (n == 0):
		print("No")
	else:
		if (t[:nHalf] == t[nHalf:]):
			print("Yes")
		else:
			print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def main():
    N=int(input())
    S=input()
    s_split=S[:N//2],S[N//2:]
    if s_split[0]==s_split[1]:
        print("Yes")
        return
    print("No")

    
if __name__=='__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N=int(input())
s=input()
c=0
if N%2==1:
 print("No")
else:
 r=int(N/2)
 for i in range(r):
  if s[i]==s[i+r]:
   c+=1
 if c==r:
  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:
import sys
readline = sys.stdin.readline
N = int(readline())
S = readline().strip()
ans = 'No'
if N % 2 == 0:
    if S[:N//2] == S[N//2:]:
        ans = 'Yes'

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

    if not end :
        print("Yes")

Submission status: Accepted

Solution code:
n=int(input())
s=str(input())
if n%2==1:
    print('No')
else:
    number=int(n/2)
    sf=[]
    sb=[]
    for i in range(0,number):
        sf.append(s[i])
    for j in range(number,n):
        sb.append(s[j])
    if sf==sb:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
import math

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors

def powd(x, n, m):
  ans = 1
  while(n > 0):
    if(bin(n & 1) == bin(1)):
      ans = (ans*x)%m
    x = x*x % m
    n = n >> 1 #ビットシフト
  return ans


#a = list(map(int, input().split()))

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
length = int(input())
str_ls = list(input())
num = length // 2
#print(num)
#print(str_ls)
ls_1 = str_ls[:num]
ls_2 = str_ls[num:]
#print(ls_1)
#print(ls_2)
if length == 1:
    print('No')
elif ls_1 == ls_2:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n=int(input())
s=list(input())
if n%2!=0:
    print("No")
else:
    d=s[:int(n/2)]
    f=s
    del f[0:len(d)]
    if d==f:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
N = int(input())
S = str(input())
half = int(len(S) / 2)
T = S[:half]
TT = T + T
if TT == S:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
import re
a = [input() for i in range(2)]
length, string = int(a[0]), a[1]
pattern = string[0:int(length/2)]
cond1 = len(string) == length and len(string)%2==0
cond2 = re.match(r"^[a-z]+$", string)
cond3 = len(re.findall(pattern, string)) == 2
if cond1 and cond2 and cond3:
  print("Yes")
else:
  print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def main():
    inNumber = input()
    inStr = input()

    try:
        wk_inNumber = int(inNumber)
    except Exception as e:
        print('No')
        return 0
    if wk_inNumber > 100 or wk_inNumber <= 0:
        print('No')
        return 0

    if inStr.islower() == False:
        print('No')
        return 0

    charInstr = list(inStr)

    if wk_inNumber % 2 == 1:
        print('No')
        return 0

    if wk_inNumber != len(charInstr):
       print('No')
       return 0

    i = 0
    while i < wk_inNumber / 2 :
        j = int(wk_inNumber / 2 + i)
        if charInstr[i] != charInstr[j]:
            print('No')
            return 0
        i += 1

    print('Yes')


main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

N = int(input())

S = input()

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

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

print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools
import math

N = int(raw_input());
S = raw_input().strip()

def good(s):
    if len(s) % 2 == 1:
        return False
    
    n = len(s) / 2
    return all(s[i] == s[i+n] for i in range(n))

print "Yes" if good(S) else "No"

Submission status: Accepted

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

if len(S_sp)%2==1:
    print("No")
elif len(S_sp)%2==0:
    for i in range(int(N/2)):
        if not S_sp[i]==S_sp[int(N/2)+i]:
            print("No")
            break
        if i==int(N/2)-1 and S_sp[int(N/2)-1]==S_sp[N-1]:
            print("Yes")

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

kanou=False

if(n%2==0):
    han=n//2
    zen=s[:han]
    go=s[han:]
    if(zen==go):
        kanou=True

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

Submission status: Accepted

Solution code:
n=int(input())
a= input()
l=[]
x=[]
y=[]
if n%2!=0:
    print('No')
else:
    for i in range(len(a)):
        l.append(a[i])
    for i in range(n//2):
        x.append(a[i])
    for j in range(n//2,n):
        y.append(a[j])
    if x==y:
        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()
a = int(len(s)/2)

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

Submission status: Accepted

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

if (a%2 !=0):
  print('No')
  
elif (a == 2):
  if (s[0] == s[1]):
    print('Yes')
  else:
    print('No')
    
else:
  b = a/2
  i = 0
  k = 0
  for i in range(int(b-1)):
    if (s[i] == s[int((int(b)+i))]):
      k+=1
    else:
      break
    
  if(k==b-1):
    print('Yes')
  else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
S = input()

s = list(S)
a = []
b = []
if N % 2 != 0:
    print('No')
else:
    M = int(N/2)
    for i in range(M):
        a.append(s[i])
        b.append(s[i+M])
    if a == b:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

if i != 0:
    print("No")
else:
    if s[:j]==s[j:]:
        print("Yes")
    else:
         print("No")

Submission status: Accepted

Solution code:
def main():
	#N, D = [int(x) for x in input().split()]
	N = int(input())
	S = input()
	
	if N % 2 == 1:
		print("No")
		return
	
	n = int(N/2)
	s1 = S[0:n]
	s2 = S[n:N]

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

if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(int(1e6))

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

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

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

Submission status: Accepted

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

if N%2==1:
    print('No')
    exit()
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=input()
s=input()
if len(s) % 2 == 0 and 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()

T=S[0:N//2]
if S==T*2:
    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()
sol = 0


for i in range(n // 2):
    
    if s[i - 1] == s[i - 1 + (n // 2)]:
        sol = sol + 1
 
if sol == n // 2:
    if n != 1 and n % 2 == 0:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
ans="No"

if n%2==0:
    m=n//2
    s=input()
    for i in range(m):
        if s[i]!=s[m+i]:
            ans="No"
            break
    else:
        ans="Yes"
else:
    ans="No"

print(ans)

Submission status: Accepted

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

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

#output
import numpy as np

if N % 2 == 1:
    print("No")
    exit()
else:
    M = int(N/2)
    T = [0] * M
    for i in range(M):
        if S[i] == S[M+i]:
            T[i] = 1
        else:
            continue

if np.sum(T) == M:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import math

S = int(input())
N = input()
Nh = N[:int(S/2)]
NN = Nh*2

if NN == N:
    print("Yes")
    exit(0)
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())

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

else:
    print("No")

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

N = int(input())
S = input().rstrip()

if N % 2 == 1:
    print('No')
else:
    mid = int(N / 2)
    head = S[:mid].rstrip()
    S2 = head + head
    #print(S)
    #print(S2)
    if S == S2:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

# print(n)
# print(s)

t1 = s[: (n // 2)]

# print(t1)

t2 = s[(n // 2) :]

# print(t2)

# print(t1)
# print(t2)

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

Submission status: Accepted

Solution code:
n = int(input())
s_ = input()
s = [val for val in s_]

if n % 2 !=0:
    print("No")
else:
    tmp = int(len(s)/2)

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

Submission status: Accepted

Solution code:
N = int(input())
X = list(input())
r = N % 2
F = 0
i = 0


if N % 2 != 0:
  print('No')
  F = 1
  
else:
  while i <= int(N/2-1):
    if X[i] == X[int(i+N/2)]:
      i+=1
      
    else:
      print('No')
      F = 1
      break
      
if F != 1:
  print('Yes')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
x = n*0.5
s_list = list(s)
half = []
if n % 2 == 1:
    print("No")
else:
    for i in range(int(len(s_list)/2)):
        half.append(s_list[i])
    if half+half == s_list:
         print("Yes")
    else:
        print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
data = []
for i in range(2):
  data.append(input())

N = data[0]
S = data[1]

N = int(N)

if N%2 == 0:
        M = int(N/2)
        S1 = S[0:M]
        S2 = S[M:N]
        if S1 == S2:
          print('Yes')
        else:
          print('No')
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[i + n//2]:
    print('No')
    exit()
print('Yes')

Submission status: Accepted

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

if N % 2 == 0 and S[0:round(N / 2)] == S[round(N / 2):N]:
    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=input()
b=input()
g=list(b)
d=list(b.encode("ascii"))
if(len(d) % 2 == 1):
  print('No')
else:
  c=0
  a=len(d)//2
  for i in range(0,a):
    if(d[i]!=d[i+a]):
        c=c+1
  if(c==0):    
   print('Yes')
  else:
    print('No')

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(readline())
S = read().rstrip()

bl = False
if N % 2 == 0:
    M = N // 2
    bl = S[:M] == S[M:]

answer = 'Yes' if bl else 'No'
print(answer)

Submission status: Accepted

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

bool = True

if N % 2 != 0:
    bool = False

for i in range(int(N / 2)):
    if s[i] != s[i + int(N / 2)]:
        bool = False

if bool:
    print("Yes")

else:
    print("No")