Polycarp has a string s[1 ... n] of length n consisting of decimal digits. Polycarp performs the following operation with the string s no more than once (i.e. he can perform operation 0 or 1 time): 

  * Polycarp selects two numbers i and j (1 ≤ i ≤ j ≤ n) and removes characters from the s string at the positions i, i+1, i+2, …, j (i.e. removes substring s[i ... j]). More formally, Polycarp turns the string s into the string s_1 s_2 … s_{i-1} s_{j+1} s_{j+2} … s_{n}. 



For example, the string s = "20192020" Polycarp can turn into strings: 

  * "2020" (in this case (i, j)=(3, 6) or (i, j)=(1, 4)); 
  * "2019220" (in this case (i, j)=(6, 6)); 
  * "020" (in this case (i, j)=(1, 5)); 
  * other operations are also possible, only a few of them are listed above. 



Polycarp likes the string "2020" very much, so he is wondering if it is possible to turn the string s into a string "2020" in no more than one operation? Note that you can perform zero operations.

Input

The first line contains a positive integer t (1 ≤ t ≤ 1000 ) — number of test cases in the test. Then t test cases follow.

The first line of each test case contains an integer n (4 ≤ n ≤ 200) — length of the string s. The next line contains a string s of length n consisting of decimal digits. It is allowed that the string s starts with digit 0.

Output

For each test case, output on a separate line: 

  * "YES" if Polycarp can turn the string s into a string "2020" in no more than one operation (i.e. he can perform 0 or 1 operation); 
  * "NO" otherwise. 



You may print every letter of "YES" and "NO" in any case you want (so, for example, the strings yEs, yes, Yes and YES will all be recognized as positive answer).

Example

Input


6
8
20192020
8
22019020
4
2020
5
20002
6
729040
6
200200


Output


YES
YES
YES
NO
NO
NO

Note

In the first test case, Polycarp could choose i=3 and j=6.

In the second test case, Polycarp could choose i=2 and j=5.

In the third test case, Polycarp did not perform any operations with the string.


import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;

public class B {

    private static boolean isMultipleTests = true;
    private static boolean readFromFile = false;
    private static boolean writeToFile = false;
    private static boolean printTimeTaken = false;
    private static String fileInput = "src/sach_in.txt";
    private static String fileOutput = "src/sach_out.txt";
    public static PrintWriter out;
    static{out=new PrintWriter(new BufferedOutputStream(System.out));if(writeToFile){try{PrintStream fileStream=new PrintStream(new FileOutputStream(fileOutput),true);System.setOut(fileStream);}catch(FileNotFoundException e){e.printStackTrace();}}}
    private static class FastReader{private BufferedReader br;private StringTokenizer st;public FastReader() throws FileNotFoundException{if(readFromFile){br=new BufferedReader(new FileReader(fileInput));}else{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;}}
    public static void main(String[] args) throws FileNotFoundException {
        long t1 = System.currentTimeMillis();
        FastReader fs = new FastReader();
        precompute();
        if(isMultipleTests) {
            long t = fs.nextInt();
            while(t-- > 0){
                solve(fs);
            }
        } else {
            solve(fs);
        }
        if(printTimeTaken) {
            out.println(System.currentTimeMillis()-t1);
        }
        out.close();
    }

    /*
      int n      = fs.nextInt();        // read input as integer
      long k     = fs.nextLong();       // read input as long
      double d   = fs.nextDouble();     // read input as double
      String str = fs.next();           // read input as String
      String s   = fs.nextLine();       // read whole line as String

      int result = 3*n;
      out.println(result);                    // print via PrintWriter
    */


    // WRITE CODE ONLY AFTER THIS ONLY

    private static void precompute(){}

    private static void solve(FastReader fs) {

        String YES = "YES";
        String NO = "NO";

        int N = fs.nextInt();
        String s   = fs.nextLine();

        int arr[] = new int[N];

        for (int i = 0; i < N; i++) {
            arr[i] = Integer.parseInt(Character.toString(s.charAt(i)));
        }

        boolean ans = false;

        boolean one = false;
        boolean two = false;
        boolean three = false;
        boolean four = false;

        boolean _one = false;
        boolean _two = false;
        boolean _three = false;
        boolean _four = false;

        int i = 0;

        int cnt = -1;
        int cntt = -1;

        if(arr[i] == 2 && arr[i+1] == 0 && arr[i+2] == 2 && arr[i+3] == 0) {
            four = true;
            ans = true;
        } else if(arr[i] == 2 && arr[i+1] == 0 && arr[i+2] == 2) {
            three = true;
            cnt = 3;
        } else if(arr[i] == 2 && arr[i+1] == 0) {
            two = true;
            cnt = 2;
        } else if(arr[i] == 2){
            one = true;
            cnt = 1;
        }

        i = N-1;

        if(arr[i] == 0 && arr[i-1] == 2 && arr[i-2] == 0 && arr[i-3] == 2) {
            _four = true;
            ans = true;
        } else if(arr[i] == 0 && arr[i-1] == 2 && arr[i-2] == 0) {
            _three = true;
            cntt = 3;
        } else if(arr[i] == 0 && arr[i-1] == 2) {
            _two = true;
            cntt = 2;
        } else if(arr[i] == 0){
            _one = true;
            cntt = 1;
        }

        if((four || three || two || one) && (_four || _three || _two || _one)) {
            if(cnt + cntt >= 4)
            ans = true;
        }


        if(ans) {
            out.println(YES);
        } else {
            out.println(NO);
        }

    }

}

