let n = readline() function isP(n) { let flag = 0 for(let i=2;i<=Math.pow(n,0.5);i++) { if(n % i === 0) { flag += 1 return false } } return true } let res = [] for(let i=2;i<=n;i++) { if(isP(i)) { res.push(i) } } let max = Infinity let a = [] for(let j=0;j<res.length;j++) { let index = res....