description: 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.
solution: import java.io.*;
  import java.util.*;
  
  public class A {
  
  	static ArrayList<Integer> primes;
  	static int[] isComposite;
  	static HashSet<Integer> hs;
  
  	static void sieve(int N) // O(N log log N)
  	{
  		isComposite = new int[N + 1];
  		isComposite[0] = isComposite[1] = 1; // 0 indicates a prime number
  		primes = new ArrayList<Integer>();
  
  		for (int i = 2; i <= N; ++i) // can loop till i*i <= N if primes array is not needed O(N log log sqrt(N))
  			if (isComposite[i] == 0) // can loop in 2 and odd integers for slightly better performance
  			{
  				hs.add(i);
  				primes.add(i);
  				if (1l * i * i <= N)
  					for (int j = i * i; j <= N; j += i) // j = i * 2 will not affect performance too much, may alter in
  														// modified sieve
  						isComposite[j] = 1;
  			}
  	}
  
  	public static void main(String args[]) throws Exception {
  		Scanner sc = new Scanner(System.in);
  		PrintWriter pw = new PrintWriter(System.out);
  
  		int t = sc.nextInt();
  		hs = new HashSet<Integer>();
  		sieve(100000);
  		z: while (t-- > 0) {
  			int n = sc.nextInt();
  			HashMap<Character, Integer> hm = new HashMap<Character, Integer>();
  			char c[] = sc.nextLine().toCharArray();
  			for (int i = 1; i < 3000; i++) {
  				char x[] = (i + "").toCharArray();
  				int g = 0;
  				if (!hs.contains(i))
  					for (int j = 0; j < c.length; j++) {
  						if (x[g] == c[j]) {
  							g++;
  							if (g == x.length) {
  								pw.println(x.length);
  								pw.println(i);
  								continue z;
  							}
  						}
  					}
  			}
  
  		}
  		pw.flush();
  	}
  
  	///////////////////////////////////////////////////////////////////////////////////////////
  
  	static class tri {
  		int x, y, z;
  
  		public tri(int x, int y, int z) {
  			this.x = x;
  			this.y = y;
  			this.z = z;
  		}
  
  	}
  
  	static class pair implements Comparable<pair> {
  		int x, y;
  		boolean w, l;
  		PriorityQueue<Long> pq;
  
  		public pair(boolean a, boolean b) {
  			w = a;
  			l = b;
  		}
  
  		pair(int s, int d) {
  			x = s;
  			y = d;
  		}
  
  		@Override
  		public int compareTo(pair p) {
  			return Long.compare(x, p.x);
  		}
  
  		@Override
  		public String toString() {
  			return x + " " + y;
  
  		}
  
  	}
  
  	static long mod(long ans, int mod) {
  		return (ans % mod + mod) % mod;
  	}
  
  	static long gcd(long a, long b) {
  		if (a == 0)
  			return b;
  		return gcd(b % a, a);
  	}
  
  	static long lcm(long a, long b) {
  		return (a * b) / gcd(a, b);
  	}
  
  	public static int log(int n, int base) {
  		int ans = 0;
  		while (n + 1 > base) {
  			ans++;
  			n /= base;
  		}
  		return ans;
  	}
  
  	static long pow(long b, long e) {
  		long ans = 1;
  		while (e > 0) {
  			if ((e & 1) == 1)
  				ans = ((ans * 1l * b));
  			e >>= 1;
  			{
  
  			}
  			b = ((b * 1l * b));
  		}
  		return ans;
  	}
  
  	static long powmod(long r, long e, int mod) {
  		long ans = 1;
  		r %= mod;
  		while (e > 0) {
  			if ((e & 1) == 1)
  				ans = (int) ((ans * 1l * r) % mod);
  			e >>= 1;
  			r = (int) ((r * 1l * r) % mod);
  		}
  		return ans;
  	}
  
  	static int ceil(int a, int b) {
  		int ans = a / b;
  		return a % b == 0 ? ans : ans + 1;
  	}
  
  	static long ceil(long a, long b) {
  		long ans = a / b;
  		return a % b == 0 ? ans : ans + 1;
  	}
  
  	static HashMap<Integer, Integer> compress(int a[]) {
  		TreeSet<Integer> ts = new TreeSet<>();
  		HashMap<Integer, Integer> hm = new HashMap<>();
  		for (int x : a)
  			ts.add(x);
  		for (int x : ts) {
  			hm.put(x, hm.size() + 1);
  		}
  		return hm;
  	}
  
  	// Returns nCr % p
  	static int C[];
  
  	static int nCrModp(int n, int r, int p) {
  		if (r > n - r)
  			r = n - r;
  		if (C[r] != 0)
  			return C[r];
  		// The array C is going to store last
  		// row of pascal triangle at the end.
  		// And last entry of last row is nCr
  
  		C[0] = 1; // Top row of Pascal Triangle
  
  		// One by constructs remaining rows of Pascal
  		// Triangle from top to bottom
  		for (int i = 1; i <= n; i++) {
  
  			// Fill entries of current row using previous
  			// row values
  			for (int j = Math.min(i, r); j > 0; j--)
  
  				// nCj = (n-1)Cj + (n-1)C(j-1);
  				C[j] = (C[j] + C[j - 1]) % p;
  		}
  		return C[r];
  	}
  
  	static class Scanner {
  		StringTokenizer st;
  		BufferedReader br;
  
  		public Scanner(InputStream s) {
  			br = new BufferedReader(new InputStreamReader(s));
  		}
  
  		public Scanner(String file) throws Exception {
  			br = new BufferedReader(new FileReader(file));
  		}
  
  		public int[] intArr(int n) throws IOException {
  			int a[] = new int[n];
  			for (int i = 0; i < a.length; i++) {
  				a[i] = nextInt();
  			}
  			return a;
  		}
  
  		public long[] longArr(int n) throws IOException {
  			long a[] = new long[n];
  			for (int i = 0; i < a.length; i++) {
  				a[i] = nextLong();
  			}
  			return a;
  		}
  
  		public String next() throws IOException {
  			while (st == null || !st.hasMoreTokens())
  				st = new StringTokenizer(br.readLine());
  			return st.nextToken();
  		}
  
  		public int nextInt() throws IOException {
  			return Integer.parseInt(next());
  		}
  
  		public long nextLong() throws IOException {
  			return Long.parseLong(next());
  		}
  
  		public String nextLine() throws IOException {
  			return br.readLine();
  		}
  
  		public double nextDouble() throws IOException {
  			String x = next();
  			StringBuilder sb = new StringBuilder("0");
  			double res = 0, f = 1;
  			boolean dec = false, neg = false;
  			int start = 0;
  			if (x.charAt(0) == '-') {
  				neg = true;
  				start++;
  			}
  			for (int i = start; i < x.length(); i++)
  				if (x.charAt(i) == '.') {
  					res = Long.parseLong(sb.toString());
  					sb = new StringBuilder("0");
  					dec = true;
  				} else {
  					sb.append(x.charAt(i));
  					if (dec)
  						f *= 10;
  				}
  			res += Long.parseLong(sb.toString()) / f;
  			return res * (neg ? -1 : 1);
  		}
  
  		public boolean ready() throws IOException {
  			return br.ready();
  		}
  
  	}
  
  	public static void shuffle(int[] times2) {
  		int n = times2.length;
  		for (int i = 0; i < n; i++) {
  			int r = i + (int) (Math.random() * (n - i));
  			int tmp = times2[i];
  			times2[i] = times2[r];
  			times2[r] = tmp;
  		}
  	}
  
  }