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.
// By : ViditBhardwaj
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

#define ff               first
#define ss               second
#define endl             "\n"
#define mp               make_pair
#define pb               push_back
#define popb             pop_back
#define umap             unordered_map
#define lb               lower_bound
#define ub               upper_bound
#define int              long long int
#define double           long double
#define TC               int TT;cin>>TT;while(TT--)
#define sz(x)            (int)(x.size()) 
#define mset(a,b)        memset(a,b,sizeof(a))
#define all(v)           (v).begin(),(v).end()
#define zerobits(x)      __builtin_ctzll(x)
#define setbits(x)       __builtin_popcountll(x)
#define SPD_emergency    ios_base::sync_with_stdio(false);cin.tie(NULL);
#define ps(x,y)          fixed<<setprecision(y)<<x
#define YES              cout<<"YES"<<endl
#define NO               cout<<"NO"<<endl

template<typename T>    // *s.find_by_order(idx) & s.order_of_key(val)
using pbds=tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>; 
typedef priority_queue<int,vector<int>,greater<int> > min_pq;
typedef priority_queue<int> max_pq;
typedef pair<int,int> pii;

#ifndef ONLINE_JUDGE
#define debug(x) cerr<<"["<<#x<<"]"<<"->";_print(x);cerr<<endl;
#else
#define debug(x)
#endif

void _print(int x){cerr<<x;}
void _print(double x){cerr<<x;}
void _print(char x){cerr<<x;}
void _print(string x){cerr<<x;}

template<class T1,class T2> void _print(pair<T1,T2> p);
template<class T> void _print(vector<T> T2);
template<class T> void _print(set<T> s);
template<class T> void _print(multiset<T> s);
template<class T1,class T2> void _print(map<T1,T2> mp);
template<class T> void _print(vector<T> T2){int c=0;cerr<<"[";for(T x:T2){cerr<<(c++?",":""),_print(x);}cerr<<"]";}
template<class T> void _print(set<T> s){int c=0;cerr<<"[";for(T x:s){cerr<<(c++?",":""),_print(x);}cerr<<"]";}
template<class T> void _print(multiset<T> s){int c=0;cerr<<"[";for(T x:s){cerr<<(c++?",":""),_print(x);}cerr << "]";}
template<class T1,class T2> void _print(pair<T1,T2> p){cerr<<"{";_print(p.ff);cerr<<",";_print(p.ss);cerr<<"}";}
template<class T1,class T2> void _print(map<T1,T2> mp){int c=0;cerr<<"[";for(auto x:mp){cerr<<(c++?",":""),_print(x);}cerr<<"]";}
void _print(pbds<int> s){int c=0;cerr<<"[";for(auto x:s){cerr<<(c++?",":""),_print(x);}cerr<<"]";}

const int N=(2e5+10),mod=(1e9+7),inf=(1e18);
const double pi=3.14159265358979323846264338;

int _pow(int a,int b){if(!b){return 1;}int ans=_pow(a,b/2);ans*=ans;if(b%2){return ans*=a;}return ans;}
int gcd(int a,int b){return b?gcd(b,a%b):a;} int lcm(int a,int b){return a/gcd(a,b)*b;}
/*____________________________________________________________________*/

signed main(){
SPD_emergency
#ifndef ViditBhardwaj
    freopen("Debug.txt","w",stderr);
#endif
    
TC{
    int n; cin>>n;
    string str; cin>>str;

    char even='#',two='#',one='#',zero='#';
    for(auto x:str){
        if((x-'0')%2==0 && (x-'0')!=2) even=x;
        if((x-'0')==2) two=x;
        if((x-'0')==1) one=x;
        if((x-'0')==0) zero=x;
    }

    if(zero!='#'){
        cout<<2<<endl;
        cout<<str[0]<<"0"<<endl;
        continue;
    }
     
    if(even!='#'){
        cout<<1<<endl;
        cout<<even<<endl;
        continue;
    }
    if(one!='#'){
        cout<<1<<endl;
        cout<<one<<endl;
        continue;
    }

    if(two!='#'){
        // 2 & odd dig
        if(n>1){
            bool yes=0;
            for(int i=1;i<n;i++){
                if(str[i]=='2'){
                    yes=1;
                }
            }

            if(yes){
                cout<<2<<endl;
                cout<<str[0]<<'2'<<endl;
                continue;
            }

            for(int i=1;i<n;i++){
                if(str[i]!='3' && str[i]!='9'){
                    cout<<2<<endl;
                    cout<<two<<str[i]<<endl;
                    yes=1;
                    break;
                }
            }
            if(yes) continue;

            // 2233339999
            
            map<char,int> cnt;
            for(auto ch:str) cnt[ch]++;

            if(cnt['3']>=2){
                cout<<2<<endl;
                cout<<"33"<<endl;
                continue;
            }

            if(cnt['9']>=2){
                cout<<2<<endl;
                cout<<"99"<<endl;
                continue;
            }

            // 23 || 29 || 239
            cout<<n<<endl;
            cout<<str<<endl;
        }else{
            cout<<1<<endl;
            cout<<str<<endl;
        }
        continue;
    }

    if(n==1){
        cout<<n<<endl;
        cout<<str<<endl;
        continue;
    }

    // check if dig occur twice
    map<char,int> cnt;
    for(auto ch:str) cnt[ch]++;

    if(cnt['9']){
        cout<<1<<endl;
        cout<<"9"<<endl;
        continue;
    }
    if(cnt['3']>=2){
        cout<<2<<endl;
        cout<<"33"<<endl;
        continue;
    }
    if(cnt['5']>=2){
        cout<<2<<endl;
        cout<<"55"<<endl;
        continue;
    }
    if(cnt['7']>=2){
        cout<<2<<endl;
        cout<<"77"<<endl;
        continue;
    }

    // check 5 in mid
    bool yes=0;
    for(int i=1;i<n;i++){
        if(str[i]=='5'){
            yes=1;
        }
    }

    if(yes){
        cout<<2<<endl;
        cout<<str[0]<<"5"<<endl;
        continue;
    }

    // 5379

    if(str[0]=='5' && cnt['7']){
        cout<<2<<endl;
        cout<<"57"<<endl;
        continue;
    }

    if(cnt['3'] && cnt['9']){
        cout<<2<<endl;
        for(auto ch:str){
            if(ch=='3'){
                cout<<"39"<<endl;
                break;
            }
            if(ch=='9'){
                cout<<"93"<<endl;
                break;
            }
        }        
        continue;
    }

    cout<<n<<endl;
    cout<<str<<endl;
}

    return 0;
}
/*

remove max dig such that rem no.
is not prime




*/