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

Solution (Python):
from sys import stdin


def input():
    return stdin.readline()[:-1]


def intput():
    return int(input())


def sinput():
    return input().split()


def intsput():
    return map(int, sinput())


n = intput()

s = input()

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  n=I()
  s=S()

  if n%2==1:
    return 'No'

  if s[:n//2]==s[n//2:]:
    return 'Yes'
  return 'No'


print(main())

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

Solution (Python):
def main():
    n = int(input())
    s = input()

    s1 = s[:n//2]
    s2 = s[n//2:]

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


if __name__ == '__main__':
    main()

Solution (Python):
import sys
from collections import defaultdict, Counter, deque
from itertools import accumulate, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right, bisect
from heapq import heappop, heappush
from fractions import gcd
from math import ceil, floor, sqrt, cos, sin, pi
from copy import deepcopy




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

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

if __name__ == '__main__':
    main()

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

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

Solution (Python):
N = int(input())
S = input().strip()

T = S[:N//2]

if S == T + T:
    print('Yes')
else:
    print('No')

Solution (Python):


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

Solution (Python):


import os
import sys


def main():
    N = read_int()
    S = inp()
    print('Yes' if N % 2 == 0 and S[N // 2:] == S[:N // 2] else 'No')




DEBUG = 'DEBUG' in os.environ


def inp():
    return sys.stdin.readline().rstrip()


def read_int():
    return int(inp())


def read_ints():
    return [int(e) for e in inp().split()]


def dprint(*value, sep=' ', end='\n'):
    if DEBUG:
        print(*value, sep=sep, end=end)


if __name__ == '__main__':
    main()

Solution (Python):
import sys
from heapq import heapify, heappop, heappush
MAX_INT = int(10e15)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
s = S()

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

Solution (Python):
def main():
    N = int(input())
    S = input()
    if N % 2 == 1:
        print("No")
        return
    for i in range(N//2):
        if S[i] != S[i + N//2]:
            print("No")
            return
    print("Yes")


if __name__ == "__main__":
    main()

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

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

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

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

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

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

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

Solution (Python):
n=int(input())
s=input()
for i in range(n):
    if s[:i]==s[i:]:
        print("Yes")
        exit()
print("No")

Solution (Python):




def main():
  input()
  s = input().strip()
  prev = s[:len(s) // 2]
  post = s[len(s) // 2:]

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


if __name__ == '__main__':
  main()

Solution (Python):

n = int(input())
s = list(input())
ans = 'Yes'
if n % 2 == 0:
    m = n //2
    for i in range(m):
        if s[i] == s[i+m]:
            pass
        else:
            ans = 'No'
else:
    ans = 'No'
print(ans)

Solution (Python):

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

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

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

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

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

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

Solution (Python):
import math

def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]





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

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

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

for i in range(N):
    if S[:i] == S[i:]:
        print('Yes')
        exit()
print('No')

Solution (Python):
n = int(input())
s = input()
if n % 2 == 1:
    print("No")
    exit(0)

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

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

Solution (Python):
n = int(input())
l = input()

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

Solution (Python):
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")

Solution (Python):
def main():

    N = int(input())
    S = input()
    if N % 2 == 1: return "No"
    else:
        M = N // 2
        if S[:M] == S[M:]:
            return "Yes"
    return "No"

if __name__ == '__main__':
    print(main())

Solution (Python):
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")

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

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

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

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

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

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10**9)
INF=10**18
def input():
    return sys.stdin.readline().rstrip()

def main():
    N=int(input())
    S=list(input())
    if N%2==0:
        for i in range(N//2):
            if S[i]!=S[N//2+i]:
                print('No')
                break
        else:
            print('Yes')
    else:
        print('No')

if __name__ == '__main__':
    main()

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

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(N: int, S: str):
    if N%2 == 1:
        print(NO)
        return 
    else:
        if S[:N//2]==S[N//2:]:
            print(YES)
        else:
            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))  
    S = next(tokens)  
    solve(N, S)

if __name__ == '__main__':
    main()

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

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

Solution (Python):


from collections import defaultdict


def getlist():
	return list(map(int, input().split()))


def main():
	N = int(input())
	S = input()
	if N % 2 != 0:
		print("No")
	else:
		M = N // 2
		judge = "Yes"
		for i in range(M):
			if S[i] != S[i + M]:
				judge = "No"
		print(judge)
	

if __name__ == '__main__':
	main()

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

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

Solution (Python):
import sys; readline = sys.stdin.readline
from collections import deque

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce
sys.setrecursionlimit(10 ** 9)



INF = 10 ** 20
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)]
mod = 10 ** 9 + 7


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

Solution (Python):
import queue
import math
"""
N = int(input())



A = []
for i in range(N):
	A.append(int(input()))

print(A)

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

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

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

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

print(ans)

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

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

Solution (Python):
N= int(input())
S = input()
if len(S) % 2 != 0:
    print('No')
    quit()
a = S[:len(S)//2]
if S == a + a:
    print('Yes')
else:
    print('No')

Solution (Python):
n = int(input())
s = str(input())
ans = 'Yes'
if len(s) % 2 == 1:
    ans = 'No'
else:
    for i in range(len(s) // 2):
        if s[i] != s[i + len(s) // 2]:
            ans = 'No'
            break

print(ans)

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

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


if __name__ == '__main__':
    main()

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

Solution (Python):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
mod = 10**9+7
Max = sys.maxsize
def l(): 
    return list(map(int,input().split()))
def m(): 
    return map(int,input().split())
def onem(): 
    return int(input())
def s(x): 
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): 
    return " ".join(map(str,x))
def max2(x): 
    return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False
"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""

n = onem()

a = list(input())

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

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


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

n = ni()
s = ns()

if n % 2:
    ans = "No"

else:
    if s[:n//2] == s[n//2:]:
        ans = "Yes"
    else:
        ans = "No"

print(ans)

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

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

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

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

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

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

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

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

if n % 2 > 0:
    print('No')
else:
    m = n // 2
    for i in range(m):
        if s[i] != s[i + m]:
            print('No')
            exit()
    print('Yes')

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):

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

Solution (Python):


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

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

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

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

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

Solution (Python):
N = int(input())
Ss = input()

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

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

Solution (Python):
def solve():
    n = int(input())
    s = input()

    if n % 2 == 1:
        return False

    half = n // 2
    return s[:half] == s[half:]


print('Yes' if solve() else 'No')

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")

def main():
    n=int(input())
    s=input()
    if n%2:
        print("No")
        exit()
    n//=2
    for c0,c1 in zip(s,s[n:]):
        if c0!=c1:
            print("No")
            exit()
    print("Yes")

main()

Solution (Python):
N, = (int(x) for x in input().split())
S = input()

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

Solution (Python):
from sys import stdin
import statistics
from math import factorial

n = int(stdin.readline().rstrip())
s = stdin.readline().rstrip()

mae = s[:n//2]
ato = s[n//2:]

if mae == ato:
    print("Yes")
else:
    print("No")

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

Solution (Python):



def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)

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


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline

N=int(input())
S=input().strip()

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

Solution (Python):
import sys

input = sys.stdin.readline

ri = lambda: int(input())
rs = lambda: input().rstrip()
ril = lambda: list(map(int, input().split()))
rsl = lambda: input().rstrip().split()
ris = lambda n: [ri() for _ in range(n)]
rss = lambda n: [rs() for _ in range(n)]
rils = lambda n: [ril() for _ in range(n)]
rsls = lambda n: [rsl() for _ in range(n)]

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

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

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

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

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

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

Solution (Python):

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

Solution (Python):



import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

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

Solution (Python):
from collections import Counter,defaultdict,deque
import sys
import bisect
import math
import itertools
import string
import queue
import copy
from heapq import heappop, heappush
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7

def inp(): 
    return int(input())
def inpm(): 
    return map(int,input().split())
def inpl(): 
    return list(map(int, input().split()))
def inpls(): 
    return list(input().split())
def inplm(n): 
    return list(int(input()) for _ in range(n))
def inpll(n): 
    return sorted([list(map(int, input().split())) for _ in range(n)])
def sortx(x,n,k):
    if k == 0:x.sort(key=lambda y:y[1,n])
    else:x.sort(reversed=True, key=lambda y:y[1,n])
def graph():
    n=inp()
    g=[[] for _ in range(n)]
    for i in range(n):
        a=inp()
        a-=1
        g[i].append(a)
        g[a].append(i)
    return n,g
def graphm():
    n,m=inpm()
    g=[[] for _ in range(n)]
    for _ in range(m):
        a,b,w=inpm()
        a-=1
        b-=1
        g[a].append((b,w))
        g[b].append((a,w))
    return n,m,g

def dijkstra(s,n,g): 
    s -= 1
    que = []
    d = [10**15 for _ in range(n)]
    d[s] = 0
    heappush( que,(0,s) )
    while len(que)>0:
        p =  heappop(que)
        v = p[1]
        if d[v] < p[0]:
            continue
        for i in range(len(g[v])):
            edge = g[v][i]
            if d[edge[0]] > d[v] + edge[1]:
                d[edge[0]] = d[v] + edge[1]
                heappush( que,(d[edge[0]] , edge[0]) )
    return d

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

      
      

if __name__ == "__main__":
    main()

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

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

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

Solution (Python):

import sys

YES = "Yes"  
NO = "No"  


def solve(N: int, S: str):
    if N % 2 == 1:
        print(NO)
    else:
        if S[:N//2] == S[N//2:]:
            print(YES)
        else:
            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))  
    S = next(tokens)  
    solve(N, S)

if __name__ == '__main__':
    main()

Solution (Python):
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")

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

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

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

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    n=int(input())
    if(n&1):
        print("No")
        return
    S=input()
    a=S[:n//2]
    b=S[n//2:]
    print("Yes" if(a==b) else "No")
resolve()

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

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

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

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

N = INT()
S = input()

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

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools
sys.setrecursionlimit(10**8)
mod = 10**9+7
mod2 = 998244353
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

n = inp()
s = input()
if n%2:
    print('No')
else:
    for i in range(n//2):
        if s[i] == s[i+n//2]:
            continue
        print('No')
        break
    else:
        print('Yes')

Solution (Python):


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

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

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N=I()
    S=ST()
    if S[:N//2] == S[N//2:]:
        print("Yes")
    else:
        print("No")
if __name__ == '__main__':
    main()

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    n = I()
    s = S()
    if s[:n//2] == s[n//2:]:
        return 'Yes'

    return 'No'


print(main())

Solution (Python):
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N,num):
    if N<=0:
        return [[]]*num
    elif num==1:
        return [I() for _ in range(N)]
    else:
        read_all = [tuple(II()) for _ in range(N)]
        return map(list, zip(*read_all))



N = I()
S = str(input())

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