Given a positive integer n. Find whether a number is a semiprime or not. Print True if number is semiprime else False. A semiprime is a natural number that is a product of two prime numbers .
The first line of the input contains a single integer T, denoting the number of test cases. Then T test case follows, a single line of the input containing a positive integer N.
Print 'True' if it is semi prime,otherwise print 'False'.
Testcase 1 : N=6, True
6 is a semiprime number as it is a product of two prime numbers 2 and 3.
Testcase 2: N = 8 , False
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.