let rec find_opt p = function
  | [] -> None
  | x :: l -> if p x then Some x else find_opt p l

let () =
  let a, b = Scanf.scanf "%s %s " (fun a b -> a, b) in
  let ab = int_of_string (a^b) in
  let pows = List.init 10000 (fun i -> (10000-i) * (10000-i)) in
  Printf.printf "%s\n" (
    match (find_opt (fun x -> x = ab) pows) with
      Some x -> "Yes"
    | None -> "No"
  )
