function main(e){const r=parseInt(e),n=Math.sqrt(r);if(n>=10)return"No";if(Number.isInteger(n))return"Yes";const t=[];for(let e=2;e<r&&e<10;e++){r%e||t.push(e)}return t.some(e=>t.some(n=>{if(e*n===r)return!0}))?"Yes":"No"}console.log(main(require("fs").readFileSync("/dev/stdin","utf8")));