open Batteries;;
  
let () =
  let _ = read_int () in
  let la = read_line () |> String.split_on_char ' ' |> List.map int_of_string in
  let lb = read_line () |> String.split_on_char ' ' |> List.map int_of_string in
  let rec diff la lb =
    match la, lb with
    | [], [] -> []
    | hda :: resta, hdb :: restb ->
       (hda - hdb) :: diff resta restb
  in
  let ldiff = diff la lb in
  let rec check l ac bc  =
    match l with
    | [] -> ac,bc
    | e :: rest ->
       if e<0 then check rest ac (bc+e)
       else check rest (ac+e) bc
  in
  let b,a= check ldiff 0 0 in
  let ans =
    if a mod (2*b) = 0 then "Yes"
    else "No" in
  print_string ans
;;
        