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: 
  //   * * * remember the days and the people * * *   //
  import java.io.BufferedReader;
  import java.io.IOException;
  import java.io.InputStreamReader;
  import java.util.*;
  
  public class B {
      static class Pair implements Comparable<Pair> {
          int a;
          int b;
  
          Pair(int a, int b) {
              this.a = a;
              this.b = b;
          }
  
          public int compareTo(Pair o) {
              return this.a - o.a;
          }
      }
  
      // ===============================================================================================
  
      public static void main(String[] args) {
          FastScanner sc = new FastScanner();
          int t = sc.nextInt();
          o: while (t-- > 0) {
              int n = sc.nextInt();
              String s = sc.nextLine();
              char ca[] = s.toCharArray();
              int a[] = new int[n];
              for (int i = 0; i < n; i++) {
                  a[i] = ca[i] - 48;
              }
  
              for (int i = n - 1; i >= 0; i--) {
                  if (a[i] == 1 || a[i] == 9 || (a[i] % 2 == 0 && a[i] != 2)) {
                      System.out.println(1);
                      System.out.println(a[i]);
                      continue o;
                  }
              }
              boolean two = false;
              boolean five = false;
              for (int i = n - 1; i >= 0; i--) {
                  if (a[i] == 5 || a[i] == 2) {
                      if (i != 0) {
                          System.out.println(2);
                          System.out.println(a[i - 1] + "" + a[i]);
                          continue o;
                      } else {
                          if (a[i] == 2)
                              two = true;
                          if (a[i] == 5)
                              five = true;
                      }
                  }
              }
  
              int count = 0;
              int xcount = 0;
              for (int i = 0; i < n; i++) {
                  if (a[i] == 3)
                      count++;
                  else if (a[i] == 7)
                      xcount++;
              }
              if (xcount >= 1) {
                  if (two) {
                      System.out.println(2);
                      System.out.println(27);
                      continue o;
                  }
                  if (five) {
                      System.out.println(2);
                      System.out.println(57);
                      continue o;
                  }
              }
              if (count >= 2) {
                  String res = "";
                  for (int i = 0; i < 2; i++)
                      res += "3";
                  System.out.println(2);
                  System.out.println(res);
                  continue o;
              } else {
                  String res = "";
                  for (int i = 0; i < 2; i++)
                      res += "7";
                  System.out.println(2);
                  System.out.println(res);
                  continue o;
              }
          }
      }
  
      // ===============================================================================================
  
      // Use this instead of Arrays.sort() on an array of ints. Arrays.sort() is n^2
      // worst case since it uses a version of quicksort. Although this would never
      // actually show up in the real world, in codeforces, people can hack, so
      // this is needed.
      static void sort(int[] arr) {
          int n = arr.length;
          ArrayList<Integer> res = new ArrayList<>();
          for (int a : arr) {
              res.add(a);
          }
          Collections.sort(res);
          for (int i = 0; i < n; i++) {
              arr[i] = res.get(i);
          }
      }
  
      static void sort(long[] arr) {
          int n = arr.length;
          ArrayList<Long> res = new ArrayList<>();
          for (long a : arr) {
              res.add(a);
          }
          Collections.sort(res);
          for (int i = 0; i < n; i++) {
              arr[i] = res.get(i);
          }
      }
  
      // Use this to input code since it is faster than a Scanner
      static class FastScanner {
          BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
          StringTokenizer st = new StringTokenizer("");
  
          String next() {
              while (!st.hasMoreTokens())
                  try {
                      st = new StringTokenizer(br.readLine());
                  } catch (IOException e) {
                      e.printStackTrace();
                  }
              return st.nextToken();
          }
  
          int nextInt() {
              return Integer.parseInt(next());
          }
  
          double nextDouble() {
              return Double.parseDouble(next());
          }
  
          String str = "";
  
          String nextLine() {
              try {
                  str = br.readLine();
              } catch (IOException e) {
                  e.printStackTrace();
              }
              return str;
          }
  
          int[] readArray(int n) {
              int[] a = new int[n];
              for (int i = 0; i < n; i++)
                  a[i] = nextInt();
              return a;
          }
  
          long[] readLongArray(int n) {
              long[] a = new long[n];
              for (int i = 0; i < n; i++)
                  a[i] = nextLong();
              return a;
          }
  
          long nextLong() {
              return Long.parseLong(next());
          }
      }
  
      // generates all the prime numbers upto n
      static void sieveOfEratosthenes(int n, ArrayList<Integer> al) {
          boolean prime[] = new boolean[n + 1];
          for (int i = 0; i <= n; i++)
              prime[i] = true;
  
          for (int p = 2; p * p <= n; p++) {
              if (prime[p] == true) {
                  for (int i = p * p; i <= n; i += p)
                      prime[i] = false;
              }
          }
          for (int i = 2; i <= n; i++) {
              if (prime[i] == true)
                  al.add(i);
          }
      }
  
      static final int mod = 1000_000_000 + 7;
      static final int imx = Integer.MAX_VALUE;
      static final int imi = Integer.MIN_VALUE;
  
      static long gcd(long num1, long num2) {
          if (num2 == 0) {
              return num1;
          }
          return gcd(num2, num1 % num2);
      }
  
      static int gcd(int num1, int num2) {
          if (num2 == 0) {
              return num1;
          }
          return gcd(num2, num1 % num2);
      }
  
      // fastPow
      static long fastPow(long base, long exp) {
          if (exp == 0)
              return 1;
          long half = fastPow(base, exp / 2);
          if (exp % 2 == 0)
              return mul(half, half);
          return mul(half, mul(half, base));
      }
  
      // multiply two long numbers % mod
      static long mul(long a, long b) {
          return a * b % mod;
      }
  
      static int nCr(int n, int r) {
          return factorial(n) / (factorial(r) * factorial(n - r));
      }
  
      // Returns factorial of n
      static int factorial(int n) {
          int res = 1;
          for (int i = 2; i <= n; i++)
              res = res * i;
          return res;
      }
  
      static void swap(int a[], int i, int j) {
          int x = a[i];
          int y = a[j];
          a[j] = x;
          a[i] = y;
      }
  
      static void swap(long a[], int i, int j) {
          long x = a[i];
          long y = a[j];
          a[j] = x;
          a[i] = y;
      }
      // a -> z == 97 -> 122
  
      // String.format("%.9f", ans) ,--> to get upto 9 decimal places , (ans is
      // double)
  
      // write
  }
  