Function to check if a number is prime or not from 0 to N
static void SieveOfEratosthenes ( ) { for ( int i = 0 ; i < prime . Length ; i ++ ) prime [ i ] = true ; for ( int p = 2 ; p * p < maxm ; p ++ ) {