Traversing all numbers to find first pair
for ( int i = 2 ; i < n ; i ++ ) { int x = n / i ; if ( isPrime [ i ] && isPrime [ x ] and x * i == n ) { if ( countDigit ( i ) == countDigit ( x ) ) return true ; } } return false ; }