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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

S = input()
# 仮にn=6の場合3より後と3までが一緒ならyes
if N % 2 == 0:
   if S[:int(N/2)] == S[int(N/2):]:
       print("Yes")
   else:
       print("No")
# 奇数ならそもそもno
else:
   print("No")

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

Submission status: Accepted

Solution code:
n = int(input())

s = input()

if len(s)%2==0:
    
    zenhan = s[:len(s)//2]

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

Submission status: Accepted

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


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

Submission status: Accepted

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

ans = "Yes"
if n % 2 != 0 or s[:n // 2] != s[n // 2:]: ans = "No"

print(ans)

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 -*-
"""
B - Echo
https://atcoder.jp/contests/abc145/tasks/abc145_b

"""
import sys


def solve(N, S):
    return 'Yes' if (N % 2 == 0) and (S[:N//2] == S[N//2:]) else 'No'


def main(args):
    N = int(input())
    S = input()
    ans = solve(N, S)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

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

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

Submission status: Accepted

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

n = len(S)
if n%2 == 0:
    for i in range(n//2):
        if not S[i] == S[n//2+i]:
            print('No')
            exit()
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
n=int(input())
s=input()
l=[]
for i in s:
  l.append(i)

org_l=[]
count=0
for i in l:
  org_l.append(i)
  count+=1
  if count==n//2:
    break

new_l=[]
for i in l[n//2:]:
  new_l.append(i)

if n<=1:
  print('No')
elif org_l == new_l:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
def actual(n, s):
    if len(s) % 2 == 1:
        return 'No'

    len_half = int(n / 2)

    if s[:len_half] == s[len_half:]:
        return 'Yes'

    return 'No'

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

print(actual(n, s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

l = len(s)

c = 0

if l%2 == 1:
    print('No')
else:
    for i in range(l//2):
        if s[i] == s[i+l//2]:
            c  =c+1
    if c == l//2:
        print('Yes')
    else:       
        print('No')

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    S = input()
    if N == 1:
        print("No")
        exit(0)
    elif N % 2 != 0:
        print("No")
        exit(0)

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

    print("Yes")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    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")
                exit()
        print("Yes")

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
N=int(input())
if N%2==1:
  print("No")
  sys.exit()
a=N//2
L=input()
if L[:a]==L[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 S[:N//2] == S[N//2:]:
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
N = int(input().rstrip())
S = input().rstrip()
if N&1==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()
# C = [int(i) for i in input().split()]
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 S[ : N//2] != S[N//2 :]:
    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:
input()
s = input()
if s[:len(s) // 2] == s[len(s) // 2:]:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import decimal # 10進法に変換，正確な計算

def input():
    return sys.stdin.readline().strip()

def main():
    n = int(input())
    s = input()
    if n % 2 != 0:
        print("No")
        return
    for i in range(n//2):
        if s[i] != s[i + n//2]:
            print("No")
            return
    print("Yes")
    
    
main()

Submission status: Accepted

Solution code:
n = int(input())
s = input()
s1 = ""
s2 = ""
if n%2 != 0:
    print("No")
    exit()
for i in range(len(s)//2):
    s1 = s1 + s[i]
    s2 = s2 + s[(len(s)//2)+i]
if s1 == s2:
    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")
else:
    n //= 2
    if s == s[:n]*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==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()
X = S[:N//2]
if X+X == S:
  print('Yes')
else:
  print('No')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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()

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

Submission status: Accepted

Solution code:
n = int(input())
s = input()
listed_s = list(s)
if n % 2 == 0:
    if "".join(listed_s[0: (n // 2)]) == "".join(listed_s[(n // 2): n]):
        print('Yes')
    else:
        print('No')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
Ss = input().rstrip()

M = N//2

if Ss[:M] == Ss[M:]:
    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:
from collections import defaultdict, deque
import sys

INF = float('inf')
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]


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

Submission status: Accepted

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

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

Submission status: Accepted

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

mid = int(n/2)


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def echo(n, s):

    sharf = s[:int(n//2)]

    return "Yes" if s == sharf+sharf else "No"

def main():
    n = int(input())
    s = str(input())
    print(echo(n, s))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n,s = raw_input(), raw_input()
print 'Yes' if len(s) % 2 == 0 and s[:len(s)/2] == s[len(s)/2:] else 'No'

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if len(S) % 2 == 1:
  print('No')
else:
  half = int(len(S) / 2)
  S_1 = S[:half]
  S_2 = S[half:]
  if S_1 == S_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:
a = int(input())
s = input()
i = a/2
i = int(i)
if(s[:i]== s[i:]):
    print("Yes")
else:
    print("No")

Submission status: Accepted

Solution code:
import sys

input = lambda: sys.stdin.readline().rstrip()


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

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
S = input()
R = list(S)
T = ""

if N%2 == 1:
  print("No")
else:
  for i in range(N//2):
    T += R[i]
  T += T
  if T == S:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

first = S[:N // 2]
second = S[N // 2:]

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

Submission status: Accepted

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

def main():
    N = int(readline())
    S = readline().strip()

    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:
import sys
n = int(input())
s = input()
d = int(n/2)
if(len(s)%2 == 1):
    print("No")
    sys.exit()
else:
    for i in range(d):
        if(s[i] != s[i + d]):
            print("No")
            sys.exit()

print("Yes")

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

half= int(len(s)/2)

if len(s)%2 == 1 :
    print('No')
    exit(0)
else:
    for i in range(half):
        if s[i]!=s[i+half]:
            print('No')
            exit(0)
        else:
            pass
print('Yes')

Submission status: Accepted

Solution code:
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    n = int(input())
    s = input()[:-1]
    if n % 2 == 0 and s[0: n // 2] == s[n // 2:n]:
        print('Yes')
    else:
        print('No')


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

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 = math.floor(int(input())/2)
s = input()
a = s[n:]
b = s[:n]
if a == b:
  print('Yes')
else:
  print('No')

Submission status: Accepted

Solution code:
# AtCoder
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=str(input())
r=s[:n//2]
t=s[n//2:]
if(r==t):
  print("Yes")
else:
  print("No")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

half = round(n / 2)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input());s=input();f=1
if n%2==0:
  if s[:n//2] == s[n//2:]:
    f=0
print('YNeos'[f::2])

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

Submission status: Accepted

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

ans = "No"

if (n % 2 == 0):
    if (str[(n//2):] == str[:(n//2)]):
        ans = "Yes"

print(ans)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if N % 2 == 0:
    if S[:int(N/2)]*2 == S:
        FLG = True

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

Submission status: Accepted

Solution code:
n = int(input())
s = 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:
def main():
    N = int(input())
    S = input()
    if N % 2 == 1:
        print("No")
        quit()
    n = N // 2
    yesno = "Yes" if S[:n] == S[n:] else "No"
    print(yesno)


if __name__ == "__main__":
    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:
    a = s[:len(s)//2]
    b = s[len(s)//2:]
    print(['No', 'Yes'][a == b])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N=int(input())
S=input()
if N%2==1:
    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()
a=0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if N%2 == 1:
  print('No')
else:
  if S[: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:
  t1=s[:n//2]
  t2=s[n//2:]
  # print(t1,t2)
  if t1==t2:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

if n%2==0 and s[0:n//2]==s[n//2:n]:
    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:
  temp1=s[-int(n/2):]
  temp2=s[:-int(n/2)]
  for i in range(0,int(n/2)):
    if temp1[i]!=temp2[i]:
      print("No")
      break
  else:
    print("Yes")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = input()
A = str(input())

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
N = int(input())
S = input()
T = list()
for i in range(int(N / 2), N):
    t = S[i]
    T.append(t)
y = 0
n = 0
for i, k in zip(T, S):
    if i == k:
        y += 1
    else:
        n += 1
if int(N % 2) != 0:
    print('No')
elif y == int(N / 2):
    print('Yes') 
else:
    print('No')

Submission status: Accepted

Solution code:
N = int(input())
S = input()
T = list()
for i in range(int(N / 2), N):
    t = S[i]
    T.append(t)
y = 0
n = 0
for i, k in zip(T, S):
    if i == k:
        y += 1
    else:
        n += 1
if N % 2 != 0:
    print('No')
elif y >= 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()

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

print('Yes')

Submission status: Accepted

Solution code:
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
n=int(input())
s=input()
if(n%2):
    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 len(S)==1:
    print("No")
elif len(S)%2==0:
    A=N/2
    MAE=S[:int(A)]
    #print(MAE)
    B=N/2
    USHIRO=S[int(B):]
    #print(USHIRO)
    
    if MAE==USHIRO:
        print("Yes")
    else:
        print("No")
    
else:
    print("No")

Submission status: Accepted

Solution code:
n = int(input())
s = list(input())
a = s[:n//2]
b = s[n//2::]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

if len(s)%2 != 0:
  print('No')
elif s == s[:len(s)//2]*2:
  print('Yes')
else:
  print('No')