Checking whether a number is semi - prime or not
function checkSemiprime ( num ) { let cnt = 0 ; for ( let i = 2 ; cnt < 2 && i * i <= num ; ++ i ) { while ( num % i == 0 ) { num = parseInt ( num / i , 10 ) ;