Print all pairs (sets) of prime numbers (p,q) such that p*q <= n, where n is given number.
The first line of input contains an integer T denoting the number of test cases. T testcases follow.
The first line of each test case is N.
For each testcase, in a new line, print the all pairs of prime numbers in increasing order.
1 ≤ T ≤ 50
4 ≤ N ≤ 400
2 2 2 3 3 2
Testcase 1: Pair (2, 2) which has both prime numbers as well as satisfying the condition 2*2 <= 4.
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.