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: Runtime Error

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

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

print( s1 == s2 ? 'Yes' : 'No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
 
if not N%2==0:
  print('No')
else:
  n = N/2
  s = S[0:n]
  na=n+1
  s2 = [na:N]
  if s==s2:
    print('yes')
  else:
    print('no')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if not N%2==0:
  print('No')
else:
  n = N/2
  s = S[0:n]
  s2 = [n:N]
  if s==s2:
    print('yes')
  else:
    print('no')

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

Solution code:
N = int(input())
Mylist = list(input())
ANSlist = []
if N%2 == 1:
  print("No")
else: 
  for i in range(N/2):
    if Mylist[i] == Mylist[i + N/2]:
      ANSlist.append("Yes")
  if len(ANSlist) == N/2:
    print("Yes")

Submission status: Runtime Error

Solution code:
# your code goes herefro
from collections import Counter
s=input()
res=Counter(s)
ans=[]
for k,v in res.items():
	ans.append(v)
if(len(set(ans))==1):
	print("Yes")
else:
	print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
S = input()
n = 0
l = [S[0]]
if N > 1:
  for i in range(N):
    if not S[i+1] in l:
      l.append(S[i + 1])
    else:
      n = i + 1
      break
  if S[0:n] == S[n:]:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
input(s)
s1 = [s[i : i + n / 2] for i in range(0, len(s), n / 2)]
if (s == s1)
  print("Yes")
else
  print ("No")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
t = list(str(input()))
if n%2 == 1:
    print("No")
else:
    ans = True
    a = ["" for i in range(int(n/2))]
    b = ["" for i in range(int(n/2))]
    for i in range(int(n/2)):
        a[i] = t[i]
        b[i] = t[int(n/2)+i]
    for i in range(int(n/2)):
        ans = ans and a[i] == b[i]
if ans:
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=input()
s=input()
if s[0]==s[3] and s[1]==s[4] and s[2]==s[5]:
  print('Yes')
else:
  print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
if N % 2 != 0:
    print("No")
else:
    sa = S[:(N//2)]
    sb = S[(N//2):]

    if sa == sb:
        print("Yes")
    else:
        print("No")

Submission status: Runtime Error

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

if N % 2 == 1:
  ans = "No"
else:
  zenhan = S[0:int(N/2)] 
  kouhan = S[int(N/2):N]
  if zenhan == kouhan:
    ans = "Yes"

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
s = sorted(s)
ans = True
if(len(s)>1):
    for i in range(0,len(s),2):
        if(s[i] != s[i+1]):
            ans = False
else:
    ans = False
if(ans):
    print("Yes")
else:
    print("No")

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if s == (s[0:half] + s[0:half]:
         print("Yes")
else:
         print("No")

Submission status: Runtime Error

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)
      break
    elif i==n//2:
      print(Yes)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

string = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
1
z

Submission status: Runtime Error

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

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
/// awoooooo

# include <bits/stdc++.h>
# define sz(x) (int)((x).size())

using namespace std;

typedef long long ll;
typedef long double ld;

typedef pair < int, int > pii;

const int N = (int)2e5 + 5;
const int inf = (int)1e9 + 7;


int n;
string s;

int main(){
  cin >> n >> s;
  if(n % 2){
    cout << "No\n";
    return 0;
  }
  if(s.substr(0, n / 2) == s.substr(n / 2, n / 2)){
    cout << "Yes\n";
  } else{
    cout << "No\n";
  }
  return 0;
}

Submission status: Runtime Error

Solution code:
n = int(input())
s = input()
print(s[:n/2]==s[n/2:] and n%2==0)