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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

half = int(n/2)

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

Submission status: Accepted

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

ans='Yes'

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

if N%2==0:
    for i in range(N//2):
        if S[i]!=S[N//2+i]:
            ans='No'
            break
    print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys

lines = sys.stdin.readlines()

N = int(lines[0].rstrip())
S = lines[1].rstrip()

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

    if zenhan == kouhan:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if N % 2 == 0:
	T = S[:int(len(S)/2)]
	T_end = S[int(len(S)/2):]

	for i in range(len(T)):
		if T[i] != T_end[i]:
			print('No')
			sys.exit()

	print('Yes')
	sys.exit()
else:
	print('No')

Submission status: Accepted

Solution code:
# coding:utf-8

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:
N = int(input())
if N%2 == 1:
    print("No")
else:
    S = input()
    S1 = S[:int(N/2)]
    S2 = S[int(N/2):]
    if S1 == S2:
        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:
N = int(input())
S = input()


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

right = S[:len(S)//2]
left = S[(len(S)//2):]

ans = 'Yes'
for i, rc in enumerate(right):
    if left[i] != rc:
        ans = 'No'

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

S = input()

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

T1 = S[0:len(S)//2:1]
T2 = S[len(S)//2:len(S):1]

#print(T1)
#print(T2)

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

Submission status: Accepted

Solution code:
N=int(input())
S=input()
if N%2==1:
  print("No")
else:
  s=""
  b=""
  for j in range(N//2):
    s=s+str(S[j])
  for i in range(N//2,len(S)):
    b=b+str(S[i])
  if s==b:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def main():
    n = INT()
    if n % 2 != 0:
        print('No')
        sys.exit()
    s = input()
    m = int(n/2)
    s1 = [s[i] for i in range(m)]
    s2 = [s[i] for i in range(m, n)]
    if s1 == s2:
        print('Yes')
    else:
        print('No')


if  __name__=='__main__':
    main()

Submission status: Accepted

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

if half == 0:
  				print("No")

elif s == (s[0:half] + s[0:half]):
                 print("Yes")
else:
                 print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    # map(int, input().split())
    # l = list(map(int, input().split()))
    N = int(input())
    S = input()
    flag = False
    for i in range(N):
        s1 = S[:i]
        s2 = S[i:]
        if s1 == s2:
            flag = True
    print('Yes' if flag else 'No')


if __name__ == "__main__":
    main()

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:
num = int(input())
s = input()

if num%2 == 0:
    a = int(num /2)
    half_s = s[:a]

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

Submission status: Accepted

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

Submission status: Accepted

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

if (n%2 == 0):
    half = int(n/2)

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def print_ans(N, S):
    """Test Case
    >>> print_ans(6, "abcabc")
    Yes
    >>> print_ans(6, "abcadc")
    No
    >>> print_ans(1, "z")
    No
    """
    if N % 2 != 0:
        print("No")
    else:
        if S[:N//2] == S[N//2:]:
            print("Yes")
        else:
            print("No")

if __name__ == '__main__':
    N = int(input().rstrip())
    S = input().rstrip()
    print_ans(N, S)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC145 A
si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
n=ni()
s=si()

if n%2==1:
    print('No')
else:
    nn = int(n/2)
    ss = s[0:nn]
    a = s.count(ss)
    if a==2:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

term = N//2
if s == s[:term] + s[:term]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(raw_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()

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

Submission status: Accepted

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

if n % 2 == 1:
	print("No")
	exit()
else:
	for i in range(n2):
		if s[i] != s[i+n2]:
			print("No")
			exit()

print("Yes")

Submission status: Accepted

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

Submission status: Accepted

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

if n%2:
    print("No")
    sys.exit()

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

Submission status: Accepted

Solution code:
from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import bisect
import copy
import math

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

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


# A
def A():
    r = I()
    print(r * r)
    return


# B
def B():
    N = I()
    s = S()
    if N % 2 != 0:
        print("No")
    elif ''.join(s[:N // 2]) == ''.join(s[N // 2:]):
        print("Yes")
    else:
        print("No")
    return


# C
def C():
    return


# D
def D():
    return


# E
def E():
    return


# F
def F():
    return


# Unittest
def resolve():
    B()
    return


# Solve
if __name__ == "__main__":
    B()

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:

def main():
    n=int(input())
    s=list(input())
    if n %2 ==1:
        print('No')
        return
    m=int(n/2)
    for i in range(0,m):
        if s[i]==s[m+i]:
            continue
        else:
            print('No')
            return
    print('Yes')
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
l = int(input())
a = input()
if l%2 == 0:
    l = int(l/2)
    s = a[0:l] + a[0:l]
    if s == a:
        print("Yes")
        quit()
print("No")

Submission status: Accepted

Solution code:
n=int(input())
s=input()
if(n%2==1):
    print('No')
else:
    m=n//2
    s1=s[0:m]
    s2=s[m:]
    #print('s1:{} s2:{}'.format(s1,s2))
    if(s1==s2):
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

pre=s[0:n//2]
post=s[n//2:]

if (pre == post):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input()) 
s = input()
flag = False
if N%2 ==0:
  if s[:N//2]==s[N//2:]:
    flag =True


print('YNeos'[not( flag )::2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = str(input())
if len(s) % 2 != 0:
    print('No')

elif s[:int(n/2)] == s[int(n/2):]:
    print('Yes')

else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if N % 2 == 0:
    half = int(N / 2)
    first = S[0:half]
    second = S[half:]

    if first == second:
        print('Yes')
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
S = input()
ans = 'No'

if N % 2 == 0:
    l = N // 2
    if S[:l] == S[l:]:
        ans = 'Yes'

print(ans)

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:
import sys
N = int(input())
S = input()
l = len(S)
if l % 2 != 0:
    print('No')
    sys.exit(0)
h  = l // 2
if S[:h] == S[h:]:
    print('Yes')
    sys.exit(0)
print('No')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a = int(input())
b = input()
r = "No"

if a%2 == 0:
    c = int(a/2)
    if b[0:c] == b[c:]:
        r = "Yes"

print(r)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    N = int(stdin.readline().rstrip())
    S = stdin.readline().rstrip()
    if N % 2 != 0:
        print('No')
    else:
        if S[: N // 2] == S[N // 2:]:
            print('Yes')
        else:
            print('No')


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    S = input()
    T = S[0:N//2]
    ans = "No"

    if (T*2) == S:
        ans = 'Yes'
    
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

if N % 2 == 1:
  ans = "No"
else:
  zenhan = S[0:int(N/2)] 
  kouhan = S[int(N/2):N]
  if zenhan == kouhan:
    ans = "Yes"
  else:
    ans = "No"

print(ans)

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    S = input()
    if N % 2 == 0:
        half = N // 2
        for i in range(half):
            A = S[i]
            B = S[i + half]
            if A != B:
                print("No")
                exit()
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
n = int(input())
s = str(input())
tmp = []
if n%2:
    print('No')
    sys.exit()

for i in range(n):
    if i+1 <= n//2:
        tmp.append(s[i])
    else:
        if tmp[i-n//2] != s[i]:
            print('No')
            sys.exit()
        else:
            continue
print('Yes')

Submission status: Accepted

Solution code:
n = int(input())
s = input()
s = sorted(s)
ans = True
if(len(s)>1 and len(s)%2 == 0):
    for i in range(0,len(s),2):
        if(s[i] != s[i+1]):
            ans = False
else:
    ans = False
if(ans):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

ans = 'No'

if n % 2 == 0:
  half = n // 2
  a = s[:half]
  b = s[half:]
  # print(a, b)
  if a == b:
    ans = 'Yes'

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if n%2==0:
    num = int(n/2)
    if s[:num] == s[num:]:
        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:
N = int(input())
S = input()
c = []
c.append(S[0:N//2])
c.append(S[N//2::])
if len(set(c)) == 1:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
def f(n, s):
    if n % 2 != 0: return "No"
    p1 = 0
    p2 = n//2
    while p2 < n:
        if s[p1] != s[p2]: return "No"
        p1+=1
        p2+=1
    return "Yes"


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

print(f(n, s))

Submission status: Accepted

Solution code:
N = int(input())

if N % 2 == 1:
    print("No")
else:
    S = input()
    threshold = N//2
    front = S[:threshold]
    back = S[threshold:]
    if front == back:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
N = int(input())
S = list(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 = 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(len(s)%2==1):
	print("No")
else:
	a = s[0:int(n/2)]
	b = s[int(n/2):n]
	if a == b:
		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:
import sys
N = int(input())
S = input()
M = N // 2

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

else:
  for i in range(0,M):
    if S[i] != S[i + M]:
      print('No')
      sys.exit()
    
  print('Yes')

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline 


#x,y = [int(i) for i in readline().split()]

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

if n&1: print("No")
else:
    if s == s[:n//2]+s[:n//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[:m] != S[m:]):
    print("No")
else:
    print("Yes")

Submission status: Accepted

Solution code:

def answer():
    N = int(input())
    S = input()

    ans = 'No'

    if N % 2 == 0:
        half = N//2
        if S[:half] == S[half:]:
            ans = 'Yes'

    print(ans)


if __name__ == '__main__':
    answer()

Submission status: Accepted

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

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

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

s1 = s[0:len(s)//2]
s2 = s[len(s)//2:len(s)]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
S=input()
S1=S[0:N//2]
S2=S[N//2:N]

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if len(S) == 1:
  print('No')
  sys.exit(0)
elif len(S) % 2:
  print('No')
  sys.exit(0)
else:
  l = int(len(S) / 2)
  a = S[:l]
  b = S[l:]
  if a == b:
    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()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if N % 2 != 0:
    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())
S = str(input())
S = list(S)

if N % 2 == 1:
    print('No')
else:
    M = N // 2
    A = []
    for i in range(M):
        A.append(S[i])
    B = []
    for i in range(M,N):
        B.append(S[i])
        
    if A == B:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

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

a = n//2

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

print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

# Nが奇数ならNo
if N % 2 != 0:
    print('No')
else:
    s_first = S[:int(N/2)]
    s_second = S[int(N/2):]

    if s_first == s_second:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

N = int(input())
S = input()
if len(S) % 2 == 0:
    char1 = S[0:N // 2]
    char2 = S[N // 2: N + 1]
    if char1 == char2:
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Accepted

Solution code:
t=input()
s=input()
a=int(t)
if a%2==1:
  print('No')
else:
  b=a//2
  j=b
  c=0
  for i in range(b):
    if s[i]==s[j]:
      c+=1
      j+=1
      continue
    else:
      break
  if c==b:
    print('Yes')
  else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())
s = input()
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 != 0 or N==1:
    print('No')
    exit()

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

print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A = input()
N = input()
if len(N)%2 != 0:
    print("No")
else:
    for i in range(int(len(N)/2)):
        if N[i] != N[i+int(len(N)/2)]:
            print("No")
            break
    else:
        print("Yes")

Submission status: Accepted

Solution code:
import sys
n = int(sys.stdin.readline())
s = sys.stdin.readline().rstrip()

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

Submission status: Accepted

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

flag = 0

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if n%2 == 1:
	res = False
s1 = s[0:n//2]
s2 = s[n//2:]
if s1==s2:
	res = True
else:
	res = False

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if n%2 == 0:
    num=n//2
    if s[:num] == s[num:]:
        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:
  s=list(s)
  x=n//2
  ss=''.join(s[:x])
  sss=''.join(s[x::])
  if ss==sss:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    N = int(input())
    S = input()

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


main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import os, sys, re, math

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

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

Submission status: Accepted

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

Submission status: Accepted

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

if l % 2 == 1:
  print("No")
elif s[:l2] == s[l2:]:
  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%2 == 1:
    print("No")
else:
    h = N//2
    T1 = S[:h]
    T2 = S[h:]
    if T1 == T2:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

    half = S[:N//2]
    half2 = S[N//2:]

    if half == half2:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

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

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