import java.util.*;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        StringBuilder sb = new StringBuilder();
        while (sc.hasNext()) sb.append(sc.nextLine());
        int n = sb.length();
        if(sb.substring(0, n/2).equals(sb.substring(n/2)))
            System.out.println("Yes");
        else
            System.out.println("No");
    }
}