A prime number (or a prime) is a natural number greater than 1 that has no positive divisors other than 1 and itself. Below is a chart of numbers up to 100 and yellow marked numbers are prime numbers. ![primes][1] We want you to write a program that can check whether a given input number is prime number or not. All number will be in the range **0 <= N <=10000**. Input: ------ Input starts with an integer **T (≤ 5000)**, denoting the number of test cases. Each test case will have one line containing the number to test. Output: ------- For each test case, print either “Yes” (without quotes) or “No” (without quotes). If the input number is prime number then print “Yes”, otherwise print “No”. Please check sample input/output to get an idea. Sample Input ------------ 3 97 55 1000 Sample Output ------------- Yes No No [1]: https://s3-ap-southeast-1.amazonaws.com/devskillimagestorage/questionimages/8a279e47-68b0-c989-90c5-08d2e286f36c_b929388111cd4762bbb4ee94dc73332d_W650xH487.jpg

MD. Jalal Uddin

Language |
Time Limit (seconds) |

C | 1.00 |

C++ | 1.00 |

C++14 | 1.00 |

C# | 3.00 |

Go | 3.00 |

Java | 3.00 |

JavaScript | 3.00 |

Objective-C | 3.00 |

Perl | 3.00 |

PHP | 3.00 |

Python | 3.00 |

Python3 | 3.00 |

Ruby | 3.00 |

VB.Net | 3.00 |

Solve/Submission

# | User | Language | Timing |
---|---|---|---|

01 | ash12 | Cpp14 | 0.00s |

02 | 7Mahfuz | Cpp14 | 0.00s |

03 | atikhashmee | Cpp14 | 0.00s |

04 | Masum_ice | Cpp14 | 0.00s |

05 | liar | Cpp14 | 0.00s |

06 | lazyfahim | Cpp14 | 0.00s |

07 | BugMechanic | Cpp14 | 0.00s |

08 | shahad_mahmud | Cpp14 | 0.00s |

09 | Anubis | Cpp14 | 0.00s |

10 | afzalul | Cpp14 | 0.00s |

11 | virus | C | 0.00s |

12 | moshiur_cse15 | Cpp14 | 0.00s |

13 | Sheikh_Fahad | Cpp | 0.00s |

14 | Indro_BU | Cpp14 | 0.00s |

15 | snow_man | Cpp14 | 0.00s |

16 | ATIK161 | Cpp14 | 0.00s |

17 | AlaminJust | Cpp14 | 0.00s |

18 | SyntaxError10 | Cpp14 | 0.00s |

19 | Ahb_arif | Cpp14 | 0.00s |

20 | JubayerSohel | Cpp14 | 0.00s |

21 | nurakib | Cpp14 | 0.00s |

22 | inam | Cpp | 0.00s |

23 | Not_Found0001 | Cpp14 | 0.00s |

24 | mir003 | Cpp14 | 0.00s |

25 | terminator_c | Cpp14 | 0.00s |

26 | jayed_al_hasan | Cpp14 | 0.00s |

27 | ProMAGFAT | Cpp14 | 0.00s |

28 | sadia2427 | Cpp14 | 0.00s |

29 | shahid_ullah | Cpp14 | 0.00s |

30 | SumonB1 | Cpp14 | 0.00s |

31 | Dragon_162 | Cpp14 | 0.00s |

32 | tico88612 | Cpp14 | 0.00s |

33 | Ratul728 | Cpp14 | 0.00s |

34 | rithu | Cpp14 | 0.00s |

35 | Ehsanul_Fahad | C | 0.00s |

36 | Morass | Cpp14 | 0.00s |

37 | sazid | Cpp | 0.01s |

38 | joymollick | Cpp14 | 0.01s |

39 | rossnebula | Cpp14 | 0.01s |

40 | Antor_Sarker_Sabuj | Cpp | 0.01s |

41 | SRS_PBM | Cpp | 0.01s |

42 | CSE1604085_nishan | Cpp | 0.01s |

43 | hafizur_acb | Cpp14 | 0.01s |

44 | habibur | Cpp14 | 0.01s |

45 | 1604099_ishtiaq | Cpp14 | 0.01s |

46 | Koushik54 | Cpp14 | 0.01s |

47 | sp_rahul | Cpp14 | 0.01s |

48 | FluidCoder | Cpp14 | 0.01s |

49 | smriad | Cpp14 | 0.01s |

50 | lightlessShadO | Cpp14 | 0.01s |

Copyright © 2015-2016 Dev Skill.

Feedback
#### Your feedback is our precious!

## Thank you for providing feedback! Our developers will be happy :)

## Sorry there was a problem when submitting the feedback. Please try again. :(