问题 1053 --Prime Test

1053: Prime Test

时间限制: 6 Sec  内存限制: 66 MB
提交: 7  解决: 2
[提交][状态][讨论版][命题人:]

题目描述

Given a big integer number, you are required to find out whether it's a prime number.

输入

The first line contains the number of test cases T (1 <= T <= 20 ), then the following T lines each contains an integer number N (2 <= N < 254).

输出

For each test case, if N is a prime number, output a line containing the word "Prime", otherwise, output a line containing the smallest prime factor of N.

样例输入

2
5
10

样例输出

Prime
2

来源

[提交][状态]