Function to check if each number of array satisfies the given condition
function checkElements ( A , n , k ) { for ( let i = 0 ; i < n ; i ++ ) { if ( Sieve [ A [ i ] ] == k ) { document . write ( " " ) ; } else { document . write ( " " ) ; } } }