coins-11_28721
In HackerLand, they have a very strange monetary system.
Each gold coin has an integer number 'N' written on it.
A coin N can be split into any number of coins.
For example {11} can be split into {5,6} or {2,4,5} or any other possible way.

You are offered such a coin to take home. But your family does not like coins which have a prime number on it. Your task is to take home as few coins as possible without a prime number on it.

Input:

The first line of the input contains a single integer T denoting the number of test cases to follow. Each test case is a single line with a number N. It is the number written on your coin. Constraints:
1 ≤ T ≤ 100
1 ≤ N ≤ 100,000  

Output:

For each test case output a single line, containing the minimum number of coins.

SAMPLE INPUT
4
11
12345
12421
2444

SAMPLE OUTPUT
2
1
2
1

Explanation

Test case 1:
{11} -> {1,10}. So, you can take home a possible minimum of 2 coins. NOTE: 1 is non-prime.

Test case 2:
{12345} can be taken home without splitting.
Similar for the rest of the test cases.
import sys
import math

n = input()

def is_prime(n):
    if n==1:
        return False
    if n % 2 == 0 and n > 2: 
        return False
    for i in range(3, int(math.sqrt(n)) + 1, 2):
        if n % i == 0:
            return False
    return True

for i in range(n):
    temp = input()
    if temp==3:
        print(3)
    elif is_prime(temp):
        print(2)      
    else:
        print(1)
4
11
12345
12421
2444

SAMPLE 30
1
8566
6308
41
5680
4427
2739
77
6274
3601
7506
8951
5345
3
9621
9300
23
720
2151
7854
3607
256
6076
9369
1729
8229
205
980
4197
1460 30
1
8566
6308
41
5680
4427
2739
77
6274
3601
7506
8951
5345
3
9621
9300
23
720
2151
7854
3607
256
6076
9369
1729
8229
63
980
4197
1460 4
11
12345
12421
2444

RAMPLE 30
1
8566
6308
30
5680
4427
8905
77
6274
3601
7506
8951
5345
3
9621
9300
23
720
2151
7854
3607
256
6076
9369
1729
8229
63
980
4197
1460 30
1
8566
6308
30
5680
4427
5859
77
6274
3601
7506
8951
5345
3
9621
9300
23
720
2151
5493
3607
256
6076
9369
1729
8229
47
980
4197
1460 30
1
8566
6308
30
5680
4427
5859
77
6274
3601
7506
8951
3398
3
9621
9300
23
720
2151
6831
2520
256
6076
9369
1729
4534
47
980
2068
1460 30
1
8566
6308
30
5736
4521
5859
77
6274
3601
7506
7939
5809
3
9621
940
23
720
2151
6831
2520
256
6076
9369
1729
4534
47
980
2068
1460 30
1
8566
6308
30
5736
4521
5859
77
6274
3601
7506
7939
5809
3
9621
940
23
720
2151
6831
2520
256
5569
9369
1729
4534
47
980
2068
1460 4
10
12345
12421
2444

SAMPLE 30
1
8566
6308
41
5680
4427
8905
77
6274
3601
7506
8951
5345
3
9621
9300
23
720
2151
7854
3607
256
6076
9369
1729
8229
63
980
4197
1361 30
1
8566
6308
30
5680
4427
5859
77
6274
3601
7506
8951
3398
3
9621
9300
42
720
2151
6831
3607
256
6076
9369
1729
8229
47
980
4197
1460 30
1
8566
6308
30
5680
4427
5859
77
6274
3601
7506
8951
3398
3
9621
9300
28
720
2151
6831
2520
256
6076
9369
1729
4534
47
980
2068
1460 30
1
8566
6308
30
10788
4521
8310
17
6274
3601
7506
7939
5809
3
9621
940
23
720
2151
6831
2520
256
5569
9369
1729
4534
47
980
2068
1460 4
11
12345
10947
4589

RAMPLE 30
1
8566
6308
41
5680
4427
5478
77
6274
3601
4261
8951
5345
3
9621
9300
23
720
2151
7854
4093
256
6076
9369
1729
8229
63
980
4197
1460 30
1
8566
10056
30
5736
4521
5859
77
6274
3601
7506
7939
5809
3
9621
940
23
720
2151
6831
2520
256
6076
9369
881
4534
47
980
2068
1460 30
1
8566
6308
30
10788
4521
8310
17
6274
3601
7506
7939
5809
3
9621
940
42
720
2151
6831
2520
256
5569
9369
1729
4534
47
980
2068
1460 30
1
8566
6308
30
10788
4521
8310
77
6274
3601
7506
7939
224
3
13089
497
23
720
2151
6831
2520
256
5569
9369
1729
4534
38
980
3472
1853 30
1
8566
6308
41
10601
4427
8905
77
6274
3601
7506
8951
5345
3
9621
9300
23
720
2151
7854
3607
256
6076
9369
1729
8229
63
980
4197
1779 30
1
8566
6308
30
5680
6550
5859
77
937
3601
7506
8951
5809
3
9621
9300
23
720
2151
6831
2520
256
6076
9369
1729
4534
47
980
2068
1460 30
1
8566
6308
30
10788
4521
8310
17
6274
3601
7506
7939
5809
3
9621
940
42
720
2151
6831
2520
256
5569
9369
1729
4534
47
1483
2068
1460 30
1
8566
6308
30
10788
4521
8310
77
6274
3601
7506
7939
224
3
13089
497
23
720
2151
6831
2520
256
5569
9369
1729
4534
38
157
3472
1853 30
1
8566
6308
30
10788
4521
8310
77
6274
3601
7506
7939
129
3
13089
497
23
720
3752
971
2520
256
6066
5613
1729
4534
23
980
3472
1853 30
1
6154
6308
41
5680
4427
3200
77
11686
3601
7506
8951
5345
1
9621
9300
23
720
2151
7854
3607
256
6076
9369
1729
8229
205
980
4197
1460 30
1
8566
6308
41
5680
966
2739
77
6274
243
7506
13040
5345
3
9621
9300
23
720
2151
7854
3607
256
6076
9369
1729
8229
63
980
4197
1460 4
11
12345
10567
4973

RAMPLE 30
1
8566
6308
48
5680
4427
5478
77
5769
3601
4261
8951
5345
3
9621
9300
23
720
2151
7854
4093
256
6076
9369
1729
8229
63
980
4197
1460 30
1
8566
6308
41
10601
4427
8905
77
6274
3601
7506
8951
5345
3
9621
9300
23
720
2801
7854
3607
256
6076
9369
1729
8229
63
980
4197
1779 30
1
7551
6308
30
5680
4427
5859
77
6274
3601
7506
8951
5345
3
9621
3762
23
720
2151
7854
3607
256
2435
2917
1729
8229
63
980
4197
1460 30
1
8566
6308
30
10788
3053
12637
77
6274
3601
7506
7939
129
3
9621
497
23
720
2151
10827
2520
118
5569
9369
1729
4534
23
980
2068
1853 30
1
8566
6308
41
10601
4427
8905
77
6274
3601
7506
8951
5345
3
9621
9300
23
720
2801
7854
3607
256
4481
9369
1729
8229
63
980
4197
1779 30
1
7551
6308
30
5680
4427
5859
23
6274
3601
7506
8951
5345
3
9621
3762
23
720
2151
7854
3607
256
2435
2917
1729
8229
63
980
4197
1460 30
1
5950
6308
30
5680
4427
5859
77
6274
3601
7506
8951
1576
3
9621
3965
23
720
2151
7537
3607
256
6076
9369
1729
8229
63
980
4197
1460 30
1
14805
6308
30
5680
4427
5859
77
6274
29
14286
8951
3398
3
9621
9300
23
720
2151
6831
3607
256
6076
8158
1729
4534
47
980
2068
1460 30
1
8566
6308
30
10355
4521
2246
77
6274
3601
7506
7939
6910
3
9621
940
32
720
2151
6831
2520
302
5569
9369
1729
4534
47
980
2068
1460 30
1
8566
6308
30
10788
5749
8310
77
6274
3601
7506
7939
129
3
13089
497
23
720
5615
971
2520
256
6066
5613
1729
4534
23
980
3472
1853 4
11
12345
9098
4973

ELPMAR 30
1
8566
6308
25
5680
4427
5478
77
5769
3601
4261
8951
5345
3
9621
9300
23
720
2151
7854
4093
256
6076
9369
1729
8229
61
980
4197
1460 30
1
5950
6308
30
5680
4427
5859
77
6274
3601
7506
8951
2819
3
9621
3965
23
720
2151
7537
3607
256
6076
9369
1729
8229
63
980
4197
1460 30
1
8566
6308
53
10788
7074
8310
17
6274
3601
7506
7939
5809
3
9621
940
42
720
2151
6831
2520
256
5569
9369
1729
4534
47
2147
2068
1460 30
1
8566
6308
30
10788
4521
8310
77
6274
3601
6777
7939
5809
1
6030
603
23
720
2151
11143
2520
256
5569
9369
1729
4078
23
980
2068
1853 30
1
14
6308
30
10788
4521
8310
77
6274
3601
7506
7939
224
3
2141
497
23
720
2151
6831
2520
256
5569
9369
1729
4534
38
157
3472
1853 30
1
8566
6308
30
10788
5749
8310
77
6274
3601
7506
7939
129
5
13089
497
23
720
5615
971
2520
256
6066
5613
1729
4534
23
980
3472
1853 30
1
8566
6308
41
5680
966
2739
77
6274
319
7506
1458
5345
3
9621
9300
1
720
2151
7854
3607
256
6076
9369
1729
8229
63
980
4197
1460 4
16
12345
9098
4973

ELPMAR 30
1
8566
6308
25
10601
4427
8905
77
6274
3601
7506
8951
5345
3
9621
9300
43
720
2801
7854
3607
256
4481
9369
1729
8229
63
980
4197
1779 30
1
14805
6308
30
5680
4427
5859
77
6274
29
14286
8951
3398
3
9621
9300
23
720
2151
6831
3607
256
6076
8158
1729
4534
91
980
3899
1460 30
1
8566
10056
30
7726
4521
4217
77
6274
4791
14354
7939
5809
3
9621
940
23
720
2151
6831
2520
256
6076
9369
881
4534
47
980
2068
218 30
1
8566
6308
53
10788
7074
8310
17
6274
3601
7506
7939
5809
3
9621
940
42
720
2151
6831
2520
256
5569
9369
1729
4534
47
2147
2068
853 30
1
8566
6308
30
19742
4521
8310
135
6274
3601
7695
3767
5809
3
9621
940
23
720
2151
6831
1335
256
5569
9369
1729
4534
23
539
2068
1460 30
1
8566
6308
25
10601
4427
8905
77
6274
3601
7506
8951
5345
3
9621
9300
43
720
2801
7854
3607
256
2090
9369
1729
8229
63
980
4197
1779 30
1
8566
6308
30
5680
4427
5859
77
8823
3601
12380
8951
3398
3
9621
9300
42
720
2151
2884
3607
367
6076
9369
1729
3868
47
980
6478
1460 30
1
8566
4133
30
10355
4521
2246
77
6274
3601
7506
7939
6910
3
14978
940
32
1371
2151
6831
2520
302
5569
9369
1729
4534
47
980
2068
1460 30
1
8566
6308
53
10788
7074
8310
17
6274
3601
7506
7939
5809
3
9621
940
42
720
2151
6831
2520
256
5569
9369
1729
4534
40
2147
2068
853 30
1
8566
6308
25
10601
4427
8905
77
6274
3601
7506
8951
5345
3
9621
9300
65
720
2801
7854
3607
256
2090
9369
1729
8229
63
980
4197
1779 30
1
5950
6308
30
5680
4427
5859
77
9490
3601
7506
8951
2819
3
9621
3965
23
720
2151
7537
2024
256
6076
9369
1729
8229
63
980
637
1460 30
1
8566
6308
30
19742
4521
8310
181
6274
3601
7695
3767
5809
3
7165
940
23
720
2151
6831
1335
256
5569
9369
1729
4534
23
539
2068
1460 30
1
14805
6308
30
5680
4427
5859
77
6274
29
14286
8951
4219
3
9621
9300
23
720
2151
12193
3607
256
6076
8158
1729
4534
91
980
7453
1460 30
1
8566
10056
30
7726
4521
4217
77
6274
4791
14354
7939
5809
3
9621
940
23
993
2151
6831
2520
256
1144
9369
881
4534
47
980
2068
211 30
1
8566
6308
30
10788
7904
8310
94
6274
3601
6777
7939
5809
1
6030
603
23
720
3659
11143
2520
256
5569
9369
1781
4078
23
980
2068
1853 30
1
8566
6308
30
10788
7904
8310
94
6274
3601
6777
7939
5809
1
6030
603
23
720
3659
11143
2520
256
5569
9369
1781
4078
44
980
2068
1853 4
11
661
15194
1670

SAMPME 30
1
8566
6308
25
5680
4427
5478
77
5339
3601
2488
8951
649
3
5761
9300
23
776
2151
7854
4093
256
6076
9369
1729
8229
61
1783
4197
1460 30
1
14805
9809
30
5680
4427
5859
77
6274
29
14286
8951
4219
3
9621
9300
23
720
2151
12193
3607
256
6076
8158
1729
4534
91
980
2729
1460 30
1
8566
6308
30
14931
2189
8310
77
3935
4002
7506
7778
5809
3
9621
940
23
461
3443
6831
468
256
5569
9369
1729
8411
47
980
2068
2174 30
1
12967
6308
30
10788
5749
8310
77
6274
5475
7506
7939
129
5
13089
497
23
720
5615
971
2520
256
6066
1469
1729
4534
23
980
4595
3689 4
22
661
15194
1670

SAMPME 30
1
8566
6308
25
5680
4427
5478
77
5339
3601
2488
8951
649
3
5761
9300
23
577
2151
7854
4093
256
6076
9369
1729
8229
61
1783
4197
1460 30
1
8566
10056
30
8208
4521
4217
77
6274
2747
14354
7939
5809
3
9621
940
23
993
2151
6831
2520
263
1144
9369
881
4534
47
980
2068
211 30
1
8566
8105
30
1233
4521
387
77
762
3601
7506
2109
365
3
9621
497
23
720
2151
6831
2520
226
3670
9369
50
6835
6
980
2068
1853 4
28
463
5384
4973

RAMPLE 30
1
5950
6308
30
5680
4427
11608
102
9490
174
7506
8951
2819
3
9621
3965
23
720
2151
7537
2024
256
6076
9369
1729
8229
53
980
637
1460 30
1
8566
6308
30
5680
4521
5859
77
5122
1688
7506
8951
42
1
8288
9300
46
387
323
4410
4845
256
9335
9369
1389
4534
47
980
2959
1460 30
1
8566
4133
30
10355
5854
2246
77
6274
3601
7506
7939
5687
1
14978
940
32
1371
2151
8257
2520
302
5569
9369
1729
5762
47
980
2068
1460 30
1
8566
8105
30
1233
4521
387
77
762
3601
13649
2109
365
3
9621
497
23
720
2151
6831
2520
226
3670
9369
50
6835
6
980
2068
1853 30
1
8566
6308
25
10601
4427
13389
92
6274
3601
7506
14586
5345
3
9621
9300
65
720
761
7854
3607
256
2090
7323
1205
8229
63
980
4197
1779 30
1
5950
6308
30
5680
4427
11608
102
9490
174
7506
8951
2535
3
9621
3965
23
720
2151
7537
2024
256
6076
9369
1729
8229
53
980
637
1460 30
1
8566
10056
30
8208
4521
4217
77
6274
2747
14354
7939
5809
3
9621
940
33
993
2151
6831
2520
87
1144
9369
881
4534
47
980
2068
211 30
1
8566
4133
30
10355
5854
2246
77
6274
3601
7506
7939
5687
1
14978
940
32
1371
2151
8257
2520
302
9171
9369
1729
5762
47
980
2068
1460 30
1
8566
8105
30
1233
4521
387
77
762
3601
13649
2109
365
3
9621
497
23
720
2151
6831
2520
226
59
9369
50
6835
6
980
2068
1853 30
1
8566
8105
30
1233
4521
387
77
762
3601
13649
2109
365
3
9621
497
21
720
2151
6831
2520
226
59
9369
50
6835
6
980
2068
1853 30
1
8566
6308
25
10601
4427
13389
92
6274
3601
7506
14586
5345
3
9621
9300
65
720
761
7854
3607
256
2090
7323
1205
15729
63
1321
4197
1779 30
1
5536
6308
30
5680
4427
11608
102
9490
174
977
8951
2535
3
9621
3965
23
720
2151
7537
2024
256
6076
9369
1729
8229
53
980
637
1460 30
1
14805
6376
30
3914
4427
5859
77
6274
29
14286
8951
4219
3
9621
9300
23
720
2151
12193
3607
256
6076
8158
31
4534
91
1240
4259
1460 30
1
8566
10056
30
8208
4521
4217
77
6274
2747
14354
7939
5809
3
9621
940
33
993
2151
6831
2520
147
1144
9369
881
4534
90
980
2068
211 30
1
8566
4133
30
10355
5854
2246
77
6274
3601
7506
7939
5687
1
14978
940
32
1371
2151
8257
2520
302
9171
13469
1729
5883
47
980
2068
1460 30
1
8566
828
44
5680
4521
5859
77
5122
1688
7506
8951
23
1
8288
9300
46
387
323
4410
4845
256
9335
9369
1389
4534
47
980
2959
1460 30
1
5536
6308
30
6997
4427
11608
102
9490
174
977
8951
2535
3
9621
3965
23
720
2151
7537
2024
256
6076
9369
1729
15300
53
980
637
1460 30
1
8566
5736
30
26427
9444
8310
77
1264
4372
4318
7939
5809
1
1546
497
23
1326
2151
7882
1023
256
4985
9369
1729
4534
23
980
2068
1460 30
1
8566
6308
30
10788
14431
16441
94
6274
3601
6777
2232
5809
1
6030
603
23
720
3659
16868
700
256
5569
9369
254
4078
17
1110
2068
1853 4
26
753
2211
550

SAMPME 30
1
8566
9492
30
471
4427
5859
77
1680
3332
7506
8951
212
3
9621
9300
17
30
379
9010
3607
256
3437
9369
2815
7678
56
1530
4014
807 30
1
8566
10056
30
6510
4521
4217
77
6274
2747
3249
7939
5809
3
9621
940
23
993
2151
6831
2520
147
1144
9369
881
4534
90
980
2068
211 30
1
8566
3021
25
10601
4427
13389
92
6274
3601
7506
14586
5345
1
9621
9300
65
992
761
7854
3607
256
2090
7323
1205
15729
63
1321
1118
1779 30
1
8566
828
44
5680
4521
5859
77
5122
1688
7506
8951
23
1
8288
9300
46
387
323
4410
7520
256
9335
9369
1667
4534
47
980
2959
1460 30
1
8566
4133
30
10355
5854
2246
77
6274
3601
7506
7939
5687
1
14978
940
32
1371
2094
11054
2520
302
9171
13469
1729
5883
47
1637
2509
1460 30
1
8566
7502
30
10355
5854
2246
77
6274
3601
7506
7939
5687
1
14978
940
32
1371
2094
11054
2520
302
9171
13469
1729
5883
47
1637
2509
1460 30
1
18864
6376
30
3914
4889
6897
77
6274
29
14286
8951
4219
3
9621
9300
23
476
2151
12193
3607
256
6076
322
31
4534
91
1008
4259
1460 30
1
8566
9492
30
471
4427
10453
77
1680
3332
7506
8951
212
3
9621
9300
17
30
379
9010
3607
357
3437
9369
2815
7678
76
1530
1443
807 30
1
8566
828
44
5680
4521
5859
77
4106
1688
7506
8951
23
1
8288
9300
38
387
323
4410
7520
256
9335
9369
1667
4534
72
980
2959
1460 30
1
114
9492
30
471
4427
10453
77
1680
3332
7506
8951
212
3
9621
47
17
30
379
9010
3607
357
3437
9369
2815
7678
76
1530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