function Main(input) {
   
    var N = input[0].trim();

//	console.log("%s",N);

  	var result = N;
  	var sosu = 9;
  
    do{
      
      if(N % sosu == 0){
         result = N / sosu;
        if(1<=result && result <=9){      
	        console.log("YES");
            return;
        }
      }
      sosu--;

    }while(sosu> 0)

    console.log("NO");

    //console.log("%s",result == 1 ? "YES":"NO");

}

Main(require("fs").readFileSync("/dev/stdin", "utf8").split("\n"));