DAYOUT2C - Prime Or Not

no tags 

Determine whether the given number is prime or not. A prime number is only divisible by 1 and the number itself.

একটি সংখ্যা মৌলিক কিনা বের করতে হবে। মৌলিক সংখ্যা শুধুমাত্র ১ এবং নিজেকে দ্বারা বিভাজ্য।

Input

First line contains the number of test cases T (T ≤ 10), then T lines follow, each contains an integer N (2 ≤ N ≤ 1000000000000).

ইনপুট ফাইলের প্রথম লাইনে থাকবে টেস্ট কেসের সংখ্যা T (T≤10), এরপরে T সংখ্যক লাইন থাকবে যাদের প্রতিটিতে একটি করে পূর্ণ সংখ্যা N(2 ≤ N ≤ 1000000000000) থাকবে।

Output

For each test case, if N is a prime, first print N, then print the string “ is a prime”, otherwise, first print N, then print “ is not a prime” without the quotes. See sample input output for more details.

প্রতিটি টেস্ট কেসের জন্য, যদি N মৌলিক হয়, প্রথমে প্রিন্ট করবে N, তারপরে “ is a prime” স্ট্রিংটি কোনও কোটেশন ছাড়া  প্রিন্ট করবে। N মৌলিক না হলে প্রথমে প্রিন্ট করবে N, তারপরে “ is not a prime” স্ট্রিংটি কোনও কোটেশন ছাড়া প্রিন্ট করবে। নমুনা আউটপুটে আরো বিস্তারিত দেখতে পারো।

Example

Input:
3
2
6
11

Output:
2 is a prime
6 is not a prime
11 is a prime

hide comments
load_3: 2024-03-19 08:57:06

pari na


Added by:Shafaet
Date:2013-01-17
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Resource:Own problem