Scanf.scanf "%d %s" (fun n s ->
    print_endline @@
        if n mod 2 = 0 then (
            let m = n / 2 in
            let rec loop i =
                if i = m then "Yes" else
                    if s.[i] <> s.[i + m] then "No" else loop (i + 1)
            in
            loop 0
        ) else "No"
)