Traversing all numbers to find first pair
for ( int i = 2 ; i < n ; i ++ ) { int x = n / i ; if ( isPrime [ i ] && isPrime [ x ] && x != i && x * i == n ) { System . out . println ( i + " ▁ " + x ) ; flag = 1 ; return ; } } if ( flag == 0 ) System . out . println ( " No ▁ such ▁ pair ▁ found " ) ; }