A number is said to be twisted prime if it is a prime number and reverse of the number is also a prime number.

**Input:**

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**.

**Output:**

Print the answer in "Yes" or "No".

**Constraints: **

1<=T<=100

2<=n<=100000

**Example:
Input:**

2

97

43

**Output:**

Yes

No

Ravneet Baansal | 72 |

mhao | 44 |

anime | 33 |

Ibrahim Nash | 29 |

Divyansh Njr | 29 |

tyaglot | 447 |

taobupt | 274 |

bentlynixon | 241 |

Ravneet Baansal | 225 |

thurki | 217 |

akhayrutdinov | 3944 |

sanjay05 | 3366 |

Michael Riegger | 2119 |

Quandray | 2086 |

Jasleen Kaur 2 | 2012 |