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 == 1 or 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 and 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()
x=int(n/2)
if n%2==0 and s[0:x]==s[x:]:print("Yes")
else:print("No")

Submission status: Accepted

Solution code:
import sys


def main():
    [n, s] = [x for x in sys.stdin]
    n = int(n)
    if n % 2 != 0:
        print("No")
        return

    half = int(n / 2)

    if s[0:half] == s[half:n]:
        print("Yes")
        return

    print("No")


main()

Submission status: Accepted

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

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:
    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:
# coding: utf-8

n = int(input().rstrip())
s = list(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

left = ""
right = ""

if n % 2 == 1:
    print("No")
else:
    for i in range(0, int(n / 2)):
        left += s[i]
    for j in range(int(n / 2), n):
        right += s[j]
    
    if left == right:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
N = int(input())
S = str(input())
 
if N + 2 // 2 == 1:
    print('No')
 
else:
    f = int(N/2)
    b = int(N/2)
    front = S[:f]
    back = S[b:]
    if front == back:
        print('Yes')
    else:
        print('No')
    
#print(front)
#print(back)

Submission status: Accepted

Solution code:
N,S=int(input()),input();print("NYoe s"[S[:N//2]==S[N//2:]::2])

Submission status: Accepted

Solution code:
N,S=int(input()),input();print("NYoe s"[N%2==0and S[:N//2]==S[N//2:]::2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
N = int(N)
S = input()
S = S.split()
S = list(S)

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
if not n%2:
  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")
  exit()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
	n = int(input())
	S = input()

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

Submission status: Accepted

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

if a == 0:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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


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

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

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

Submission status: Accepted

Solution code:
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

n = ni()
s = input()

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

Submission status: Accepted

Solution code:
def echo(n,s):
  if n % 2 != 0:
    pass
  else:
    if s[:int(n/2)] == s[int(n/2):]:
      return "Yes"
  return "No"

print(echo(int(input()),input()))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

n = int(n / 2)

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

Submission status: Accepted

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

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

else:
    n = N // 2

    for i in range(n):
        if S[i] != S[n+i]:
            print("No")
            break
        
        elif i == n-1:
            print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

    # calc


if __name__ == '__main__':
    main()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

s = str(input())

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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


def solve(N, S):
    if N % 2 != 0:
        return False

    for i in range(N // 2):
        if S[i] != S[i + N // 2]:
            return False
    return True


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


    if solve(N, S):
        print(YES)
    else:
        print(NO)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

def no():
    print("No")
def yes():
    print("Yes")
    

n=int(input().rstrip())
s=input().rstrip()


if n%2==1:
    no()
    sys.exit()
m=n//2
for i in range(m):
    if s[i]!=s[i+m]:
        no()
        sys.exit()
yes()

Submission status: Accepted

Solution code:
import sys

N = int(input())
S = input()
ret = 'No'
if N % 2 == 1:
    print(ret)
    sys.exit()
pos = int(N/2)
if S[:pos] == S[pos:]:
    ret = 'Yes'
print(ret)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

count=0
if N%2!=0 or N==1:
    print('No')
else:
    for i in range(int(N/2)):
        if s[i] != s[i+int(N/2)]:
            count+=1
        else:
            count=count

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    n = int(readline())
    s = str(readline().rstrip().decode('utf-8'))
    if n % 2 == 0:
        print("Yes" if s[:n//2] == s[n//2:] else "No")
    else:
        print("No")


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(half):
  a.append(S[i])
  b.append(S[i + half])
  
if(N % 2 != 0):
  ans = 0
else:
  if(a == b):
    ans = 1
  else:
    ans = 0

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if N%2 != 0:
  print('No')
else:
  is_echo=True
  
  for i in range(int(N/2)):
    if S[i] != S[i+int(N/2)]:
      is_echo=False
      
  if is_echo:
    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:
from sys import exit

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:
import sys
N = int(input())
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding by utf-8
N = int(input())
S = str(input())
t = int(N / 2)
if S[:t] == S[t:]:
  print("Yes")
else:
  print("No")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
s = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

# N: 正の整数
N = int(input())
# S: 長さNの英小文字からなる文字列S
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if n % 2 != 0 or n != len(s):
    print("No")
elif a == b:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    S = input()
    if len(S)!=N or len(S)==1:
        print("No")
    else:
        index = len(S)/2
        half1 = S[:int(index)]
#        print("1:",half1)
        half2 = S[int(index):]
#        print("2:",half2)
        if half1 == half2:
            print("Yes")
        else:
            print("No")

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import heapq
import sys
from collections import Counter

#N,K=map(int, input[0].split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
#x=list(map(int, input[1].split()))  #リスト入力 「a1 a2 a3 ...」みたいな配列のような入力のとき

N=int(input())
S=input()
if N%2==1:
    print('No')
    exit()

#print(S[:N//2],S[-(N//2):])

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    S = input()
    q, r = divmod(N, 2)
    if r == 0 and S[:q] == S[-q:]:
        print('Yes')
    else:
        print('No')


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input = [input() for i in range(2)]
N=int(input[0])
S=input[1]
s1=len(S)//2
s2=len(S)

if len(S)%2!=0:
    print('No')
else:
    if S[0:s1]==S[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:
import sys
N = int(input())
S = str(input())
if N%2==1:
    print("No")
    sys.exit(0)
partial_N = S[0:int(N/2)]
if S == partial_N + partial_N:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
n = int(N/2) #Nが奇数は不適
S = input()
if S[:n] == S[n:]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

a = len(s)
b = a // 2

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

h = len(s) / 2

if s[0:h] == s[h:len(s)]:
    print 'Yes'
else:
    print 'No'

Submission status: Accepted

Solution code:
#!/usr/bin/pypy
I=int(raw_input())
S=raw_input()

T1=S[:I/2]
T2=S[I/2:]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def f(n, str):
    if n % 2 == 1:
        return "No"
    
    t = ""
    m = int(n / 2)
    for i in range(m):
        t = t + str[i]
    
    if t + t == str:
        return "Yes";

    return "No" 

if __name__ == '__main__':
    n = int(input())
    str = input()
    print(f(n, str))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
target = input()
if len(target) % 2 == 1:
    print("No")
else:
    index = len(target) // 2
    str1 = target[:index]
    str2 = target[index:]
    if str1 == str2:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

S = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

s = input()
k=""
if n%2 == 0:
    i =int( n/2)
    for j in range(0,i):
        k += s[j]
    if s == k+k:
        print('Yes')
    else:
        print('No')

else:
    print('No')

Submission status: Accepted

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

s_text = input()

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

half_n = int(n / 2)
half_b_text = s_text[0:half_n]
half_a_text = s_text[half_n:n]

# print(half_b_text)
# print(half_a_text)
if half_b_text == half_a_text:
    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:
import sys
N = int(input())
S = str(input())

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

S_1 = S[:N//2]

S_2 = S_1+S_1
if S == S_2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

if N%2 == 1:
  ans = "No"

print(ans)

Submission status: Accepted

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

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

S1, S2 = [], []
for i, s in enumerate(S):
    if i < (N/2):
        S1.append(s)
    else:
        S2.append(s)

s1 = ' '
for s in S1:
    s1 += s

s2 = ' '
for s in S2:
    s2 += s

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,s=open(0);print("YNeos"[s[:-1]!=s[:int(n)//2]*2::2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
i = n // 2
t = s[0:i]

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

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:
n = int(input())
s = input()
def func():
    if n % 2 == 1:
        return 'No'
    if s[n//2:] == s[:n//2]:
        return 'Yes'
    return 'No'
ans = func()
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = input()
if N % 2 == 1:
    print('No')
    exit()

S_bef = S[0:N//2]
S_aft = S[N//2:]

if S_bef == S_aft:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
S = list(str(input()))
T1 = []
T2 = []

if N%2 == 0:
  for i in range(int(N/2)):
    T1.append(S.pop(0))
    T2.insert(0,S.pop(-1))
  if T1==T2:
    print('Yes')
    exit()
print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
N = int(input())

S = input()

S1 = S[0:int(N/2)]

S2 = S[int(N/2):N]

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

Submission status: Accepted

Solution code:
# your code goes here
n=int(input())
st=input()
a=""
b=""
if(n%2==1):
	print("No")
else:
	x=n//2
	for i in range(0,x):
		a=a+st[i]
	for i in range(x,n):
		b=b+st[i]
	if(a==b):
		print("Yes")
	else:
		print("No")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
INF = float("inf")


def yes():
    print("Yes")  # type: str


def no():
    print("No")  # type: str


def solve(N: int, S: str):
    if N % 2 == 1:
        no()
        return

    if S[:(N//2)] == S[(N//2):]:
        yes()
    else:
        no()
    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()