B - Echo 解説 /

実行時間制限: 2 sec / メモリ制限: 1024 MB

配点 : 200

問題文

正整数 N 及び、長さ N の英小文字から成る文字列 S が与えられます。

この文字列が、ある文字列を二度繰り返したものであるかを判定してください。 則ち、文字列 T であって、 S = T + T となるものが存在するかを判定してください。

制約

  • 1 ≤ N ≤ 100
  • S は英小文字から成る
  • |S| = N

入力

入力は以下の形式で標準入力から与えられる。

N
S

出力

S が文字列を二度繰り返したものであるならば Yes と、そうでないならば No と出力せよ。


入力例 1

6
abcabc

出力例 1

Yes

T = abc とおくと、 S = T + T となります。


入力例 2

6
abcadc

出力例 2

No

入力例 3

1
z

出力例 3

No

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