Full Prime
Submissions: 3083   Accuracy:

17.94%

  Difficulty: School   Marks: 0
*School Problem's Submission isn't counted in score!

Given a number n, check if it is Full Prime or not. 
Note : A full prime number is one in which the number itself is prime and all its digits are also prime.

Input:
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.

Output:
Print 'Yes' if it is full prime,otherwise print 'No'.

Constraints:
1<=T<=100

1<=N<=100000

Example:
Input:

2
53
41

Output:
Yes

No

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Sahil Chhabra
Author: Sahil_Chhabra


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.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.