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.*;
  
  @SuppressWarnings("WeakerAccess")
  public class Main {
  
      private static FastScanner in = new FastScanner();
      private static FastOutputJ out = new FastOutputJ();
  
      private boolean isPrime(int n) {
          if (n == 1) {
              return false;
          }
          for (int i = 2; i <= Math.sqrt(n); i++) {
              if (n % i == 0) {
                  return false;
              }
          }
          return true;
      }
  
      private int rec(int[] nums, int sum, int rem, int i, int m10) {
          if (rem == 0) {
              if (sum == 1 || !isPrime(sum)) {
                  return sum;
              }
              return -1;
          }
          if (i < 0) {
              return -1;
          }
          int resCur = rec(nums, sum + m10 * nums[i], rem - 1, i - 1, m10 * 10);
          if (resCur > 0) {
              return resCur;
          }
          return rec(nums, sum, rem, i - 1, m10);
      }
  
      public void run() throws Exception {
          int t = in.nextInt();
          for (int i = 0; i < t; i++) {
              in.nextInt();
              char[] chars = in.next().toCharArray();
              int[] nums = new int[chars.length];
              for (int j = 0; j < chars.length; j++) {
                  nums[j] = chars[j] - '0';
              }
              for (int len = 1; len <= nums.length; len++) {
                  int sum = rec(nums, 0, len, nums.length - 1, 1);
                  if (sum > 0) {
                      out.println(len);
                      out.println(sum);
                      break;
                  }
              }
              out.flush();
          }
      }
  
      public static void main(String[] args) throws Exception {
          new Main().run();
          out.flush();
          out.close();
      }
  }
  
  
  class FastScanner {
      BufferedReader br;
      StringTokenizer st;
  
      FastScanner() {
          this(System.in);
      }
  
      FastScanner(InputStream stream) {
          br = new BufferedReader(new InputStreamReader(stream));
      }
  
      FastScanner(File file) {
          try {
              br = new BufferedReader(new FileReader(file));
          } catch (FileNotFoundException e) {
              throw new RuntimeException(e);
          }
      }
  
      String next() {
          while (st == null || !st.hasMoreTokens()) {
              try {
                  st = new StringTokenizer(br.readLine());
              } catch (IOException e) {
                  throw new RuntimeException(e);
              }
  
          }
          return st.nextToken();
      }
  
      int nextInt() {
          return Integer.parseInt(next());
      }
  
      int[] nextIntArray(int n) {
          int[] arr = new int[n];
          for (int i = 0; i < n; i++) {
              arr[i] = nextInt();
          }
          return arr;
      }
  
      long[] nextLongArray(int n) {
          long[] arr = new long[n];
          for (int i = 0; i < n; i++) {
              arr[i] = nextLong();
          }
          return arr;
      }
  
      long nextLong() {
          return Long.parseLong(next());
      }
  
      public String nextLine() {
          try {
              return br.readLine();
          } catch (IOException e) {
              throw new RuntimeException(e);
          }
      }
  }
  
  class FastOutputJ {
      private final BufferedWriter bf;
  
  
      public FastOutputJ(OutputStream outputStream) {
          bf = new BufferedWriter(new OutputStreamWriter(outputStream));
      }
  
      public FastOutputJ() {
          this(System.out);
      }
  
      private void printOne(Object s) {
          try {
              bf.write(s.toString());
          } catch (IOException e) {
              throw new RuntimeException(e);
          }
      }
  
      public void println(Object s) {
          printOne(s);
          printOne("\n");
      }
  
      public void print(Object... os) {
          printd("", os);
      }
  
      public void printd(String delimiter, Object... os) {
          for (Object o : os) {
              printOne(o);
              printOne(delimiter);
          }
      }
  
      public void flush() {
          try {
              bf.flush();
          } catch (IOException e) {
              throw new RuntimeException(e);
          }
      }
  
      public void close() {
          try {
              bf.close();
          } catch (IOException e) {
              throw new RuntimeException(e);
          }
      }
  }