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
import math
import collections
import itertools
import array
import inspect

# Set max recursion limit
sys.setrecursionlimit(1000000)


# Debug output
def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))


# Binary converter
def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in sys.stdin.readline().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v

def comb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2, r + 1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p - 1, r, p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def bisearch(L, target):
    low = 0
    high = len(L) - 1
    
    while low <= high:
        mid = (low + high) // 2
        guess = L[mid]
        if guess == target:
            return True
        elif guess < target:
            low = mid + 1
        elif guess > target:
            high = mid - 1
    if guess != target:
        return False

# --------------------------------------------

dp = None


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

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


main()

Submission status: Accepted

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

Submission status: Accepted

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

flag=0

if N%2==0:
    for i in range(int(N/2)):
        if S[i]!=S[i+int(N/2)]:
            flag+=1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s_list =[ i for i in str(input()) ]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

S1=S[:len(S)//2]
S2=S[len(S)//2:]

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

Submission status: Accepted

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

def solve():
    N = int(input())
    S = input()
    if N%2 != 0:
        print("No")
        return

    l_str = S[0:N//2]
    r_str = S[N//2:]

    if l_str == r_str:
        print("Yes")
        return

    print("No")

if __name__ == "__main__":
    solve()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
s = str(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 len(s) % 2 != 0:
  res = "No"
else:
  h = s[0: n//2]
  if h + h == s:
    res = "Yes"
  else:
    res = "No"

print(res)

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

Submission status: Accepted

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

T = S[0:int(N) // 2]
W = S[int(N) // 2:int(N) + 1] 

if T == W:
	print('Yes')
else:
	print('No')

Submission status: Accepted

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

Submission status: Accepted

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

a = int(N/2)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys
n = int(input())
s = input()
if(n%2!=0):
    print("No")
    sys.exit()
half = n//2
ans = True
for i in range(half):
    if(s[i] != s[i+half]):
        ans= False
print("Yes") if(ans) else print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from math import factorial
from fractions import Fraction
import heapq, bisect
import math
import itertools
sys.setrecursionlimit(10 ** 5 + 10)
INF = 10**15 +5
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()))

n = INT()
s = input()

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

Submission status: Accepted

Solution code:
def solve(n, s):
    if n % 2 == 1:
        return "No"
    else:
        return "Yes" if (s[:n//2] == s[n//2:]) else "No"

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc145/tasks/abc145_b

import sys
sys.setrecursionlimit(12345678)
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop


def main():
    n = int(input())
    s = input()
    s1 = s[:n//2]
    s2 = s[n//2:]
    print('Yes' if s1 == s2 else 'No')

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = list(input())
o = 'Yes'
if n % 2 != 0:
    o = 'No'
else:
    t = int(n/2)
    if s[:t] != s[-t:]:
        o = 'No'
print(o)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding=utf-8

if __name__ == '__main__':
    N = int(input())
    S = input()

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

    N = int(N / 2)

    T1 = ''
    T2 = ''

    for i in range(N):
        T1 += S[i]
        T2 += S[i + N]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

T1 = S[:(N-1)//2+1]
T2 = S[(N-1)//2+1:]

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

Submission status: Accepted

Solution code:
ln=input()
s=input()
if len(s)%2:
    print("No")
elif 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:
l, s = int(input()), input()

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

Submission status: Accepted

Solution code:
n = int(input().strip())
s = input().strip()
if n % 2 == 0 and all(s[i] == s[n//2+i] for i in range(n//2)):
  print ("Yes")
else:
  print ("No")

Submission status: Accepted

Solution code:
N=int(input())
S=input()
print("YNeos"[S[:N//2]!=S[N//2:]::2])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
S=input()
print("YNeos"[S[:N//2]!=S[N//2:]::2])

Submission status: Accepted

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

Submission status: Accepted

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

N = int(N)

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

Submission status: Accepted

Solution code:
n=int(input())//2
s=input()
a=s[0:n:]
b=s[n::]
if a==b:
  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:(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:
    if s[:n//2] == s[n//2:]:
        print('Yes')
        sys.exit()
print('No')

Submission status: Accepted

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


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num=int(input())
data=list(input())
count=0

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

else:
  half=num//2
  for i in range(half):
    if data[i]==data[half+i]:
      count+=1          
  if count==half:
    print("Yes")
  else:
    print("No")

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32

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

def solve(N: int, S: str):
    if N%2 == 0:
        if S[:N//2] == S[N//2:]:
            print(YES)
            exit()
        
    print(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()

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

count = 1
if n % 2 == 1:
  count = 0
else:
  h = int(n/2)
  for i in range(h):
    if t[i] != t[i+h]:
      count = 0
if count == 0:
  print('No')
else:
  print('Yes')

Submission status: Accepted

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

if N % 2 == 1:
    result = "No"
else:
    n = N // 2
    if S[:n] == S[n:]:
        result = "Yes"
    else:
        result = "No"

print(result)

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

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

Submission status: Accepted

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

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



if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = list(input())
T = S[:N//2]
if T*2 == S:
  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:
import math
n = int(input())
word = list(input())
center = math.floor(n / 2)
if n > 0 and n % 2 == 0 and "".join(word[:center]) == "".join(word[-center:]):
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    global visited, adj, sets
    print = out.append
    ''' Cook your dish here! '''
    q = get_int()
    st = sys.stdin.readline().strip()
    if st[:q//2]==st[q//2:]:
        print("Yes")
    else:
        print("No")



''' Coded with love at India by Satyam Kumar '''
import sys, threading
from collections import defaultdict
#input = iter(sys.stdin.buffer.read().decode().splitlines()).__next__
out = []
get_int = lambda: int(input())
get_list = lambda: list(map(int, input().split()))
main()
# [main() for _ in range(int(input()))]
print(*out, sep='\n')

Submission status: Accepted

Solution code:
N , S = [input() for i in range(2)]
N = int(N)

o = int(N / 2)

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

elif S[0:o] + S[0:o] in S:
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

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

else :
    n = N//2
    s1 = S[0:n]
    s2 = S[n:N]
    
    if (s1 == s2):
        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, s = int(input()), input().strip()
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 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()
amari = N % 2
sho = N // 2
flag = False
if amari == 0:
    if S[:sho] == S[sho:]:
        flag = True
if flag:
    print('Yes')
else:
    print('No')

Submission status: Accepted

Solution code:
number = int(input())
word = list(input())
judge = 'Yes'
            
if number%2 == 1:
	judge = 'No'
    
else:
	for i in range(int(number/2)):
		if word[i] != word[int(number/2 + i)]:
			judge = 'No'

print(judge)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#abc145b
import sys

n=int(raw_input())
s=raw_input()
if n%2:
 print 'No'
 sys.exit()
if s[:n/2]==s[n/2:]:
 print 'Yes'
else:
 print 'No'

Submission status: Accepted

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

def main():
    N = int(input())
    s = input().strip()
    if N%2==0 and s[:N//2] == s[N//2:]:
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    main()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
N = int(input())

S = input()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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()
poss=0
for i in range(n-1):
    if(s[0:i+1]==s[i+1:]):
        poss=1
        break
if(poss):
    print('Yes')
else:
    print('No')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

echo = True
if N % 2 == 0:
    for n in range(N//2):
        if S[n] != S[n + N//2]:
            echo = False
            break
else:
    echo = False

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

s=int(input())
t=input()
if t[:s//2]==t[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:
def main():
    n = int(input())
    s = input()

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = list(input())
i = 0
Answer = "No"
if n%2 == 0:
  while i < n/2 :
    if s[i] == s[int((n/2))+i]:
      Answer = "Yes"
      i += 1
    else:
      Answer = "No"
      break
print(Answer)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def judge(N,str):
    a = list(str)
    b = []
    c = []
    if N%2 == 0:
        for k in range(int(N/2)):
            b.append(a[k])
            c.append(a[k+int(N/2)])
        if b == c:
            print("Yes")
        else:
            print("No")
    else:
        print("No")
N = int(input())
S = input()
judge(N,S)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

n=int(input())
#s=input()
s=input().rstrip()
s1=s[:n//2]
s2=s[n//2:]
if s1==s2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

n=int(input())
#s=input()
s=sys.stdin.readline().rstrip()
s1=s[:n//2]
s2=s[n//2:]
if s1==s2:
    print("Yes")
else:
    print("No")

Submission status: Accepted

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

n=int(input())
s=input()
if n%2:
    print("No")
    exit()

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

Submission status: Accepted

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

n=int(input())
s=input()
if n%2:
    print("No")
    exit()

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

Submission status: Accepted

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

Submission status: Accepted

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