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.
import java.io.DataInputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
 
public class Main {
 
    private static void run() throws IOException {
        int n = in.nextInt();
        char[] s = in.next().toCharArray();
 
        Set<Character> one = new HashSet<>(Arrays.asList('1', '4', '6', '8', '9'));
 
        for (int i = 0; i < n; i++) {
            if (one.contains(s[i])) {
                out.println(1);
                out.println(s[i]);
                return;
            }
        }
 
        for (int i = 0; i < n; i++) {
            for (int j = i + 1; j < n; j++) {
                int d1 = s[i] - '0';
                int d2 = s[j] - '0';
                int now = d1 * 10 + d2;
                for (int c = 2; c * c <= now; c++) {
                    if (now % c == 0) {
                        out.println(2);
                        out.print(d1);
                        out.print(d2);
                        out.println();
                        return;
                    }
                }
            }
        }
 
        for (int i = 0; i < n; i++) {
            for (int j = i + 1; j < n; j++) {
                for (int k = j + 1; k < n; k++) {
                    int d1 = s[i] - '0';
                    int d2 = s[j] - '0';
                    int d3 = s[k] - '0';
                    int now = d1 * 100 + d2 * 10 + d3;
                    for (int c = 2; c * c <= now; c++) {
                        if (now % c == 0) {
                            out.println(3);
                            out.print(d1);
                            out.print(d2);
                            out.print(d3);
                            out.println();
                            return;
                        }
                    }
                }
            }
        }
        out.println(-1);
    }
 
    public static void main(String[] args) throws IOException {
        in = new Reader();
        out = new PrintWriter(new OutputStreamWriter(System.out));
 
        int t = in.nextInt();
        for (int i = 0; i < t; i++) {
            run();
        }
 
        out.flush();
        in.close();
        out.close();
    }
 
    private static int gcd(int a, int b) {
        if (a == 0 || b == 0)
            return 0;
        while (b != 0) {
            int tmp;
            tmp = a % b;
            a = b;
            b = tmp;
        }
        return a;
    }
 
    static final long mod = 1000000007;
 
    static long pow_mod(long a, long b) {
        long result = 1;
        while (b != 0) {
            if ((b & 1) != 0) result = (result * a) % mod;
            a = (a * a) % mod;
            b >>= 1;
        }
        return result;
    }
 
    private static long multiplied_mod(long... longs) {
        long ans = 1;
        for (long now : longs) {
            ans = (ans * now) % mod;
        }
        return ans;
    }
 
    @SuppressWarnings("FieldCanBeLocal")
    private static Reader in;
    private static PrintWriter out;
 
    private static int[] read_int_array(int len) throws IOException {
        int[] a = new int[len];
        for (int i = 0; i < len; i++) {
            a[i] = in.nextInt();
        }
        return a;
    }
 
    private static long[] read_long_array(int len) throws IOException {
        long[] a = new long[len];
        for (int i = 0; i < len; i++) {
            a[i] = in.nextLong();
        }
        return a;
    }
 
    private static void print_array(int[] array) {
        for (int now : array) {
            out.print(now);
            out.print(' ');
        }
        out.println();
    }
 
    private static void print_array(long[] array) {
        for (long now : array) {
            out.print(now);
            out.print(' ');
        }
        out.println();
    }
 
    static class Reader {
        private static final int BUFFER_SIZE = 1 << 16;
        private final DataInputStream din;
        private final byte[] buffer;
        private int bufferPointer, bytesRead;
 
        Reader() {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }
 
        public String readLine() throws IOException {
            final byte[] buf = new byte[1024]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1) {
                if (c == '\n') {
                    break;
                }
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }
 
        public int nextSign() throws IOException {
            byte c = read();
            while ('+' != c && '-' != c) {
                c = read();
            }
            return '+' == c ? 0 : 1;
        }
 
        private static boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }
 
        public int skip() throws IOException {
            int b;
            // noinspection ALL
            while ((b = read()) != -1 && isSpaceChar(b)) {
                ;
            }
            return b;
        }
 
        public char nc() throws IOException {
            return (char) skip();
        }
 
        public String next() throws IOException {
            int b = skip();
            final StringBuilder sb = new StringBuilder();
            while (!isSpaceChar(b)) { // when nextLine, (isSpaceChar(b) && b != ' ')
                sb.appendCodePoint(b);
                b = read();
            }
            return sb.toString();
        }
 
        public int nextInt() throws IOException {
            int ret = 0;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            final boolean neg = c == '-';
            if (neg) {
                c = read();
            }
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');
 
            if (neg) {
                return -ret;
            }
            return ret;
        }
 
        public long nextLong() throws IOException {
            long ret = 0;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            final boolean neg = c == '-';
            if (neg) {
                c = read();
            }
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg) {
                return -ret;
            }
            return ret;
        }
 
        public double nextDouble() throws IOException {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ') {
                c = read();
            }
            final boolean neg = c == '-';
            if (neg) {
                c = read();
            }
 
            do {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
 
            if (c == '.') {
                while ((c = read()) >= '0' && c <= '9') {
                    ret += (c - '0') / (div *= 10);
                }
            }
 
            if (neg) {
                return -ret;
            }
            return ret;
        }
 
        private void fillBuffer() throws IOException {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1) {
                buffer[0] = -1;
            }
        }
 
        private byte read() throws IOException {
            if (bufferPointer == bytesRead) {
                fillBuffer();
            }
            return buffer[bufferPointer++];
        }
 
        public void close() throws IOException {
            din.close();
        }
 
    }
}