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 static java.lang.Math.max;
  import static java.lang.Math.min;
  import static java.lang.Math.abs;
  import static java.lang.System.out;
  import java.util.* ;
  import java.math.*;
  import java.io.*;
  
  
   public class javaTemplate {
  	
  	public static final int M = 1000000007 ;
  	static FastReader sc = new FastReader();
  	static int N = 86028121 ;
  	static boolean globB[] = new boolean[N+1] ;
  	static int globA[] = new int[10000000] ;
  	
  	
  	public static void main(String[] args) {
  	    
  	    
  	    
      int t = sc.nextInt() ;
  		
  		while(t -- != 0) {
  			int k = sc.nextInt() ;
  			String s = sc.next() ;
  			boolean val = false ;
  			for(int i = 0; i< s.length() ; i++) {
  				
  				for(int j = 0; j< s.length() ; j++) {
  					if(s.charAt(j) == '1' || s.charAt(j) == '4' || s.charAt(j) == '6' || s.charAt(j) == '8' || s.charAt(j) == '9') {
  						System.out.println("1");
  						System.out.println(s.charAt(j));
  						val = true ;
  						break ;
  					} 
  				}
  				
  				
  
  				
  				if(s.charAt(i) == '2' && !val) {
  					for(int j = i+1; j< s.length() ; j++) {
  						if(s.charAt(j) == '2' || s.charAt(j) == '5' || s.charAt(j) == '7') {
  							System.out.println("2");
  							System.out.println(s.charAt(i)+ "" + s.charAt(j));
  							val = true ;
  							break ;
  						}
  					}
  				} else if(s.charAt(i) == '3' && !val) {
  					for(int j = i+1; j< s.length() ; j++) {
  						if(s.charAt(j) == '2' || s.charAt(j) == '3' || s.charAt(j) == '5') {
  							System.out.println("2");
  							System.out.println(s.charAt(i)+ "" + s.charAt(j));
  							val = true ;
  							break ;
  						}
  					}
  				} else if(s.charAt(i) == '5' && !val) {
  					for(int j = i+1; j< s.length() ; j++) {
  						if(s.charAt(j) == '2' || s.charAt(j) == '5' || s.charAt(j) == '7') {
  							System.out.println("2");
  							System.out.println(s.charAt(i)+ "" + s.charAt(j));
  							val = true ;
  							break ;
  						}
  					}
  				} else if(s.charAt(i) == '7' && !val) {
  					for(int j = i+1; j< s.length() ; j++) {
  						if(s.charAt(j) == '2' || s.charAt(j) == '5' || s.charAt(j) == '7') {
  							System.out.println("2");
  							System.out.println(s.charAt(i)+ "" + s.charAt(j));
  							val = true ;
  							break ;
  						}
  					}
  				}
  				
  				if(val) break ;
  				
  			}
  			
  			
  			
  			
  			
  		
  			
  		}
  		
  		
  		
  	}
  
  
  	/*
  	 @ Observation is imp. for problem A and B
  	 1->> Read the problem properly take time to read the problem 
  	 if it is too lengthy.
  	 2->> Draw the test cases of A and B 
  	 3->> Don't over think the problem 
  	 4->> Try to take sum variable as long
  	 5->> Avoid Nested if else statement
  	 6->> If it looks like a Greedy problem try to figure out the ans. 
  	 for the smallest test case.
  	 7->> If it is a binary String check no. of 0's and 1's. 
  	 If it is a even try to pair it (may be not applicable for every questions).
  	 8->> Always check the constrains and try BruteForce
  	 @ Implement it quickly 
  	 */
  	
  
  	
  	
  	
  
  
  	
  	
  //_________________________//Template//_____________________________________________________________________
  	
  	
  		//		FAST I/O
  		static class FastReader {
  	        BufferedReader br;
  	        StringTokenizer st;
  	        
  	        public FastReader()
  	        {
  	            br = new BufferedReader(
  	                new InputStreamReader(System.in));
  	        }
  	 
  	        String next()
  	        {
  	            while (st == null || !st.hasMoreElements()) {
  	                try {
  	                    st = new StringTokenizer(br.readLine());
  	                }
  	                catch (IOException e) {
  	                    e.printStackTrace();
  	                }
  	            }
  	            return st.nextToken();
  	        }
  	 
  	        int nextInt() { return Integer.parseInt(next()); }
  	 
  	        long nextLong() { return Long.parseLong(next()); }
  	 
  	        double nextDouble()
  	        {
  	            return Double.parseDouble(next());
  	        }
  	 
  	        String nextLine()
  	        {
  	            String str = "";
  	            try {
  	                str = br.readLine();
  	            }
  	            catch (IOException e) {
  	                e.printStackTrace();
  	            }
  	            return str;
  	        }
  		}
  	
  	
  		
  		
  		
  		// Sorting
  		public static void sort(int[] arr) {
  	        //because Arrays.sort() uses quicksort which is dumb
  	        //Collections.sort() uses merge sort
  	        ArrayList<Integer> ls = new ArrayList<Integer>();
  	        for(int x: arr)
  	            ls.add(x);
  	        Collections.sort(ls);
  	        for(int i=0; i < arr.length; i++)
  	            arr[i] = ls.get(i);
  	    }
  		
  		
  		
  		
  		
  		// Modulo
  		static int mod(int a) {
  		   return (a%M + M) % M;
  		}
  		
  		
  		
  		
  		
  		
  		
  		//		Palindrom or Not
  		static boolean isPalindrome(String str, int low, int high) {
  					while (low < high) {
  						if (str.charAt(low) != str.charAt(high)) return false;
  					 	low++;
  					 	high--;
  					}
  					return true;
  				}
  	
  	
  
  	
  	
  	
  	
  	
  	
  	
  	
  		// check if sorted or not	
  		public static boolean isSorted(int[] a)
  	    {
  	        for (int i = 0; i < a.length - 1; i++)
  	        {
  	            if (a[i] > a[i + 1]) {
  	                return false;
  	            }
  	        }
  	        return true;
  	    }
  	
  	
  	
  		
  		
  	
  		// GCD
  		public static int GCD(int a , int b) {
  				if(b == 0) return a ;
  				
  				return GCD(b, a%b) ;
  			}
  	
  		
  		
  		
  		
  		// sieve
  		public static void sieve() {
  			Arrays.fill(globB, true);
  			globB[0] = false ;
  			globB[1] = false ;
  			for(int i = 2 ; i * i <= N ; i++) {
  				if(globB[i]) {
  				for(int j = i * i ; j<= N ; j+= i) {
  					globB[j] = false ;
  				 }
  				}
  			}
  			
  		}
  
  		
  		
  		
  		// fastPower
  		public static long fastPowerModulo(long a, long b, long n) {
  			long res = 1 ;
  			while(b > 0) {
  			if((b&1) != 0) {
  				res = (res * a % n) % n ;
  			}
  			a = (a % n * a % n) % n ;
  			b = b >> 1 ;
  			}
  			return res ;
  		}
  	
  		
  		
          // LCM
  		static int LCM(int a, int b)
  	    {
  	        return (a / GCD(a, b)) * b;
  	    }
  		
  
  }
  
  
   
   
   
   
   
   
  