During the hypnosis session, Nicholas suddenly remembered a positive integer n, which doesn't contain zeros in decimal notation. 

Soon, when he returned home, he got curious: what is the maximum number of digits that can be removed from the number so that the number becomes not prime, that is, either composite or equal to one?

For some numbers doing so is impossible: for example, for number 53 it's impossible to delete some of its digits to obtain a not prime integer. However, for all n in the test cases of this problem, it's guaranteed that it's possible to delete some of their digits to obtain a not prime number.

Note that you cannot remove all the digits from the number.

A prime number is a number that has no divisors except one and itself. A composite is a number that has more than two divisors. 1 is neither a prime nor a composite number.

Input

Each test contains multiple test cases.

The first line contains one positive integer t (1 ≤ t ≤ 10^3), denoting the number of test cases. Description of the test cases follows.

The first line of each test case contains one positive integer k (1 ≤ k ≤ 50) — the number of digits in the number.

The second line of each test case contains a positive integer n, which doesn't contain zeros in decimal notation (10^{k-1} ≤ n < 10^{k}). It is guaranteed that it is always possible to remove less than k digits to make the number not prime.

It is guaranteed that the sum of k over all test cases does not exceed 10^4.

Output

For every test case, print two numbers in two lines. In the first line print the number of digits, that you have left in the number. In the second line print the digits left after all delitions. 

If there are multiple solutions, print any.

Example

Input


7
3
237
5
44444
3
221
2
35
3
773
1
4
30
626221626221626221626221626221


Output


2
27
1
4
1
1
2
35
2
77
1
4
1
6

Note

In the first test case, you can't delete 2 digits from the number 237, as all the numbers 2, 3, and 7 are prime. However, you can delete 1 digit, obtaining a number 27 = 3^3.

In the second test case, you can delete all digits except one, as 4 = 2^2 is a composite number.
from itertools import combinations_with_replacement
t = int(input())

table = {
            1: False,
            2: True,
            3: True,
            4: False,
            5: True,
            6: False,
            7: True,
            8: False,
            9: False
        }
not_in = [23, 37, 53, 73] 

def f(k, n):
    for c in n:
        if not table[int(c)]:
            print(1)
            print(c)
            return

    # i am looking for the smallest sized composite of [2 3 5 7]
    # can i get to a composite of sized 3,
    # if the answer is sized 3 => if i remove a number i get
    # 23 or 37 or 53 or 73 then bad
    # 
    # => nope cause then to reduce it i would would have x23, 2x3, 23x
    for i in range(0, k - 1):
        for j in range(i+1, k):
            p = int("".join([n[i], n[j]]))
            if not (p in not_in):
                print(2)
                print(p)
                return
            

for _ in range(t):
    k = int(input())
    n = input()
    # algorithm says, we are looking for a composite number in any of them
    # we search for composites of size 1, then 2, and so on
    # we kno there exists some number that can be removed
    # highly unlikely that a prime (worst case) can be broken up into sum sub
        
    f(k,n)
    



    # [hi] d [lo] -> [hi] * (10 ** len(lo)) + [lo] 
    # 7 * 100 + 7 * 10 + 4
    # 237   2 * 100 + 3 * 10 + 7 

    # If the last digit is not prime i can just get rid of everything else
    # i mean if there is a composite in there then just delete everything
    # but the composite right?

    # if the number has all prime digits




