import java.util.Scanner

object Main extends App {

  val sc = new Scanner(System.in)
  val n = sc.nextInt()

  private val kuku: Seq[Int] = (1 to 9).flatMap(i => (1 to 9).map(_ * i))

  kuku.contains(n) match {
    case true => println("Yes")
    case false => println("No")
  }

}
