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

Submission status: Accepted

Solution code:
def resolve():
    n=int(input())
    s=input()
    if n%2!=0 or n==0:
        print('No')
    else:
        s1 = s[0:n//2]
        s2 = s[n//2:n]
        if s1==s2:
            print('Yes')
        else:
            print('No')
resolve()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():

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

resolve()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

n = (N//2)
j = True


for i in range(n):
    if S[i] != S[i + n]:
        j = False

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC 145: B – Echo
N = int(input())
S = input()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from bisect import bisect_right as bsr
from collections import Counter as cnt
from collections import defaultdict as dd
from collections import deque
from fractions import gcd
from itertools import permutations as perm
from math import ceil, factorial, floor
from operator import itemgetter as ig

sys.setrecursionlimit(1000000)

# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)


def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]


def yesno(v, yes="Yes", no="No", upper=False):
    if upper:
        print([yes.upper(), no.upper()][not v])
    else:
        print([yes, no][not v])


def main():
    """エントリーポイント"""
    N, S = input(int, str)
    if N % 2 == 1:
        print("No")
        return
    yesno(S[:N // 2] == S[N // 2:])


if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()

Submission status: Accepted

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

temp = n // 2
a = s[:temp]
b = s[temp:]

ans = "Yes" if a == b else "No"
print(ans)

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

Submission status: Accepted

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

Submission status: Accepted

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

if N % 2 == 0:
    num = int(N/2)
    string = S[:num]
    strstr = string + string
    if S == strstr:
        print("Yes")
    else:
        print("No")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if n % 2 != 0:
    print('No')
    exit(0)
# print(s[0:n//2],s[n//2:n])
if s[0:n//2] == s[n//2:n]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n = int(input())

s = input()

if n % 2 == 1:
    print('No')
else:
    if s[: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:
    print("No")
    exit()

mid = int((n+1)/2)
# print(s[mid])
if s[:mid] == s[mid:]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

    if s == temp+temp:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(ans)

Submission status: Accepted

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

if n % 2 == 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()
ans = True
if N%2==1:
    print('No')
else:
    for i in range(N//2):
        if S[i]==S[i+N//2]:
            continue
        else:
            ans = False
            break
    if ans:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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 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")
    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:
def q2():
    N = int(input())
    S = input()
    ans = 'Yes'
    d, m = divmod(N, 2)

    if m == 1:
        ans = 'No'
    elif S[:d] != S[d:]:
        ans = 'No'

    print(ans)


if __name__ == '__main__':
    q2()

Submission status: Accepted

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

Submission status: Accepted

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

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


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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# https://atcoder.jp/contests/abc145/tasks/abc145_b
n = int(input())
s = input()
if n % 2 != 0:
    print('No')
    exit()
n2 = n // 2
if s[0:n2] == s[n2:n]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

if __name__ == "__main__":
  main()

Submission status: Accepted

Solution code:
A=int(input())
B=input()
N=int(A//2)

for i in range(N):
    if B[A-1] == B[A-1-N]:
        A-=1

if A==N:
    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()


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

Submission status: Accepted

Solution code:
N = int(input())
string = str(input())
flag = True
for i in range(N//2):
	if string[i]!=string[(N//2)+i]:
		flag = False
		break
if(flag and N%2==0):
	print("Yes")
else:
	print("No")

Submission status: Accepted

Solution code:
A = int(input())
B = list(input())
if A % 2 == 0 and B[:A//2] == B[A//2:]:
    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
sys.setrecursionlimit(10**8)
INF = float('inf')
MOD = 10**9+7


def main():
  N = int(input())
  S = input()
  ans = 'Yes'
  if N%2==1:
    ans = 'No'
  else:
    L = len(S)//2
    for i in range(L):
      if S[i] != S[L+i]:
        ans = 'No'
        break
  print(ans)
  
  
if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import fractions
import sys
import itertools
import numpy as np
#入力:N(int:整数)
def input1():
	return int(input())

#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

#入力:[n1,n2,...nk](int:整数配列)
def input_array():
	return list(map(int,input().split()))

def keta(N):
	return len(str(N))

n=input1()
s=list(str(input()))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

n = int(readline())
s = readline().rstrip().decode()
if s[n // 2:] == s[:n // 2]:
    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 accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
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

N = INT()
S = input()
T = S[:N//2]

if T*2 == S:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
S = list(map(str, 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()
a=[str(c) for c in s]
if n%2==1:
  print("No")
else:
  l=n//2
  a1=a[:l]
  a2=a[l:]
  a1="".join(a1)
  a2="".join(a2)
  if a1==a2:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
import numpy as np

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


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


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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:
n = int(input())
s = list(input())
if n%2!=0: print('No')
else:
  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 = list(input())
half = len(s) // 2
if len(s) % 2 != 0:
    print("No")
else:
    if s[:half] == s[half:]:
        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[:int(n/2)] == s[int(n/2):]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

half = len(S)//2

if len(S)%2 != 0:
    print('No')
else:
    #print(S[:half],S[half:])
    if S[:half] == S[half:]:
        print('Yes')
    else:
        print('No')

Submission status: Accepted

Solution code:
def check(n, s):
    if n%2 == 1: return 'No'
    for i in range(n//2):
        if s[i] != s[n//2 + i]:
            return 'No'
    return 'Yes'

n = int(input())
s = input()
print(check(n,s))

Submission status: Accepted

Solution code:
nim = int(input())

data = input()

if (data[0:nim//2]==data[nim//2:]):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
dum1,dum2 = divmod(n,2)
flag = "ok"
if dum2 != 0:
  print("No")
else:
  for i in range(dum1):
    if s[i] != s[i+dum1]:
      flag = "ng"
      break
  if flag == "ng":
    print("No")
  else:
    print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

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

if n % 2 == 1:
    print('No')
else:
    t1, t2 = s[0:n//2], s[n//2:]
    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')
elif 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()
for i in range(n):
  if s[:i] == s[i:]:
    print('Yes')
    exit()
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:
import sys

# 入力を整数に変換して受け取る
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())
# 入力全てを整数に変換したものの配列を受け取る
def LI(): return list(map(int, sys.stdin.readline().split()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

# リストを改行区切りで出力する
p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))


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

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

Submission status: Accepted

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

Submission status: Accepted

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

flg = True
if N % 2 != 0:
    flg = False

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s= list(input())
ans = 'Yes'

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# 初期入力
N =int(input())
S =input()

#
harf =len(S)//2
T1 =S[:harf]
T2 =S[harf:]
if T1 ==T2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

if N%2!=0:
    print("No")
else:
    x=[]
    y=[]
    for n in range(N//2):
        x.append(S[n])
    for n in range(N//2,N):
        y.append(S[n])
        
    if x==y:
        print("Yes")
    else:
        print("No")

Submission status: Accepted

Solution code:
r = int(input())
s = input()
s_length = len(s)

if(s_length % 2 != 0):
    print("No")
else:
    s_length_half = s_length // 2
    first, last = s[:s_length_half], s[s_length_half:]
    if(first == last):
        print("Yes")
    else:
        print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def yes_no(flg):
    """
        if True return Yes
        if False return No
    """
    if flg:
        print('Yes')
    else:
        print('No')

n = int(input())
s = input()
flg = False
yes_no(n % 2 == 0 and s[:n//2] == s[n//2:])

Submission status: Accepted

Solution code:
# ABC145 - Virtual
# A
if False: print(int(input())**2)

# B
if True:
    N=int(input())
    S=input()
    print('Yes' if N%2==0 and S[:N//2]*2==S else 'No')
# C
if False:
    import itertools

    def fact(n,mod):
        ret=1
        for i in range(2,n+1):
            ret=(ret*i)%mod
        return ret

    N=int(input())
    X=[tuple(map(int,input().split())) for _ in range(N)]
    ans=0
    for p in itertools.permutations(X):
        # print(p)
        sx,sy=p[0]
        for x,y in p:
            ans+=((sx-x)**2+(sy-y)**2)**0.5
            sx,sy=x,y
        # print(ans)
    ans/=fact(N,10**9+7)
    print(ans)

# D
# E

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
n=int(input())
s=input()
if n%2==0 and s[0:int(n/2)]+s[0:int(n/2)]==s:
    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(int(N/2)):
		if S[i]!=S[int(i+N/2)]:
			print('No')
			exit()
	print('Yes')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
List=list(input())
ans="No"
if (n//2)*2==n:
    t=True
    for i in range(int(n/2)):
        if List[i]!=List[n//2+i]:
            t=False
            break
    if t:
        ans = "Yes"
print(ans)

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

Submission status: Accepted

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

if n%2==1:
  print("No")
  exit()
else:
  count=0
  m=n//2
  for i in range(m):
    if a[i]==a[i+m]:
      count+=1
    else:
      count=0

if count==m:
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

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

if N % 2 == 1:
    result = 'No'
else:
    middle = N // 2
    if S[:middle] == S[middle:]:
        result = 'Yes'
    else:
        result = 'No'

print(result)

Submission status: Accepted

Solution code:
a = int(input())
b = str(input())
c = int(a/2)
right = b[:c]
left = b[c:]
if right == left:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

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

else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input())
S = list(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()
half = divmod(N, 2)
result = False

if N % 2 == 0:
    if S[0:N // 2] == S[N // 2:]:
        result = True

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

t = s[:n//2]

print("Yes" if t+t == s else "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()

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

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

Submission status: Accepted

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

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