function Main (input){
  input = input.split("\n");
  tmp = input[0].split(" ");
  var N = parseInt(tmp[0],10);
  for(x = 1; x < 10; x++){
    for(y = 1; y < 10; y++){
      if(N == x*y){
        console.log("yes");
      }else{
        console.log("No");
      }
    }
  }
  
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));