Under construction

Still being built. Things may change

Repeating String

Time limit2sMemory limit1024 MB

Summary
Given a string of length N, the task is to check whether its first half equals its second half and print Yes or No.
Level

Easy1 of 10

Topics
String, Implementation
Solved
No attempts yet

Problem

Writing the same string twice in a row gives a repeating string.

For example, OIOI, JJJJJJ, and JOIOIJOIOI are repeating strings, but IOOI and JOIIOI are not.

You are given a string S of length N. N is even, and each character of S is J, O, or I.

If S is a repeating string, print Yes. Otherwise, print No.

Input

Input is given from Standard Input in the following format.

N
S

Output

If S is a repeating string, print Yes. Otherwise, print No.

Constraints

  • 2 ≦ N ≦ 100.
  • N is even.
  • S is a string of length N.
  • Each character of S is J, O, or I.

Examples3

  1. Example 1

    Input
    6
    JOIJOI
    
    Expected output
    Yes
    
  2. Example 2

    Input
    6
    IOIOIO
    
    Expected output
    No
    
  3. Example 3

    Input
    2
    OO
    
    Expected output
    Yes