let () =
  let n = Scanf.sscanf (input_line stdin) "%d" (fun a -> a) in
  let rec loop i =
    if i > 9 then "No"
    else if n mod i = 0 then
      if n / i <= 9 then "Yes" else loop (i + 1)
    else loop (i + 1)
  in
  print_string (loop 1);
  print_newline ()
