Function to check if each number of array satisfies the given condition
static void checkElements ( int [ ] A , int n , int k ) { for ( int i = 0 ; i < n ; i ++ ) { if ( Sieve [ A [ i ] ] == k ) { Console . WriteLine ( " YES " ) ; } else { Console . WriteLine ( " No " ) ; } } }