open System
[<EntryPoint>]
let main fsharp_saikooooo =
   let n = Console.ReadLine() |> int 

   [1..9] |> List.map (fun x -> if n % x = 0 then n / x else 100) 
   |> List.filter (fun x -> x < 10) 
   |> List.length 
   |> fun x -> (if x = 0 then "NO" else "YES") 
   |> stdout.WriteLine
   
   0