this store all prime number upto 10 ^ 5 this function find all prime
static ArrayList findPrime ( int MAX ) { bool [ ] pm = new bool [ MAX + 1 ] ; for ( int i = 0 ; i < MAX + 1 ; i ++ ) pm [ i ] = true ;