let rec _solve n i j = if i * j == n then print_string "Yes" else match (i, j) with
   (1, 1) -> print_string "No"
 | (i, 1) -> _solve n (i-1) 9
 | (i, j) -> _solve n i (j-1)

let solve n = _solve n 9 9

let () = Scanf.scanf "%d" solve