let () =
  let rec check num a b =
    if b = 0 then false else if a * b = num then true 
    else if a = 1 then check num 9 (b-1)
    else check num (a-1) b in
  Scanf.scanf "%d\n" @@ fun n ->
  Printf.printf "%s\n" (if (check n 9 9) then "Yes" else "No")
