object Main {
  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    val n = sc.nextInt

    val pattern = for {
      x <- (1 to 9)
      y <- (1 to 9)
      if (x * y == n)
    } yield (x, y)

    println(if (pattern.length > 0) "YES" else "NO")
  }
}