A number is said to be twisted prime if it is a prime number and reverse of the number is also a prime number.
The first line of input contains an integer T denoting the number of test cases. The first and last line of each test case consists of an integer n.
Print the answer in "Yes" or "No".
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.