Semiprime numbers are natural numbers that are products of exactly two (possibly equal) prime numbers.


Semiprimes   are also known as:

   semi-primes
   biprimes
   bi-primes
    2-almost    primes
   or simply:    P2  


Example
 
   1679  =  23 × 73  

(This particular number was chosen as the length of the Arecibo message).



Task

Write a function determining whether a given number is semiprime.



See also

 The Wikipedia article:  semiprime.
 The Wikipedia article:  almost prime.
 The OEIS sequence:  A001358: semiprimes  which has a shorter definition: the product of two primes.


BYTE FUNC IsSemiPrime(INT n)
  INT a,b
 
  a=2 b=0
  WHILE b<3 AND n#1
  DO
    IF n MOD a=0 THEN
      n==/a b==+1
    ELSE
      a==+1
    FI
  OD
  IF b=2 THEN
    RETURN(1)
  FI
RETURN(0)
 
PROC Main()
  INT i
 
  PrintE("Semiprimes:")
  FOR i=1 TO 500
  DO
    IF IsSemiPrime(i) THEN
      PrintI(i) Put(32)
    FI
  OD
RETURN