let n = stdin.ReadLine() |> int
stdin.ReadLine().ToCharArray() |> Array.mapi (fun i x->(x,i) ) 
|>fun x ->
    (
        x |> Array.filter(fun (x,i) -> i < (n+1) / 2) |> Array.map fst 
        , x |> Array.filter (fun (x,i) -> i >= (n+1) / 2) |> Array.map fst
    )
||> (=)
|> function
| true -> "Yes"
| false -> "No" 
|> stdout.WriteLine