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.util.*;
import java.io.*;
import java.math.*;

public class Main {

    private static FastReader fr = new FastReader();
    private static Helper hp = new Helper();
    private static StringBuilder result = new StringBuilder();

    public static void main(String[] args) {
        Task solver = new Task();
        solver.solve();
    }

    static class Task {

        public void solve() {
            int tc = fr.ni();
            test:
            while (tc-- > 0){
                int n = fr.ni();
                String s = fr.next();
                if(n < 4){
                    result.append("NO\n");
                    continue;
                }
                if(s.startsWith("2020") || s.endsWith("2020")){
                    result.append("YES\n");
                    continue;
                }
                String sub1 = s.substring(0, 1);
                String sub2 = s.substring(0, 2);
                String sub3 = s.substring(0, 3);
                if(sub1.compareTo("2") == 0 && s.endsWith("020")){
                    result.append("YES\n");
                    continue;
                }
                if(sub2.compareTo("20") == 0 && s.endsWith("20")){
                    result.append("YES\n");
                    continue;
                }
                if(sub3.compareTo("202") == 0 && s.endsWith("0")){
                    result.append("YES\n");
                    continue;
                }
                result.append("NO\n");
            }
            System.out.println(result);
        }
    }

    static class Helper {
        public int[] ipArrInt(int n) {
            int[] arr = new int[n];
            for (int i = 0; i < n; i++)
                arr[i] = fr.ni();
            return arr;
        }

        public long[] ipArrLong(int n, int si) {
            long[] arr = new long[n];
            for (int i = si; i < n; i++)
                arr[i] = fr.nl();
            return arr;
        }
    }

    private static long computeNcR(int n, int r){
        long p = 1, k = 1;
        if (n - r < r) {
            r = n - r;
        }
        if (r != 0) {
            while (r > 0) {
                p *= n;
                k *= r;
                long m = gcd(p, k);
                p /= m;
                k /= m;
                n--;
                r--;
            }
        }
        return p;
    }

    private static long gcd(long n1, long n2) {
        long gcd = 1;
        for (int i = 1; i <= n1 && i <= n2; ++i) {
            if (n1 % i == 0 && n2 % i == 0) {
                gcd = i;
            }
        }
        return gcd;
    }

    static class FastReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;
        private static PrintWriter pw;

        public FastReader() {
            reader = new BufferedReader(new InputStreamReader(System.in));
            pw = new PrintWriter(System.out);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int ni() {
            return Integer.parseInt(next());
        }

        public long nl() {
            return Long.parseLong(next());
        }

        public String rl() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return null;
        }

        public int[] nextIntArr(int n) throws IOException {
            int[] arr = new int[n];
            for (int i = 0; i < arr.length; i++)
                arr[i] = fr.ni();
            return arr;
        }

        public void print(String str) {
            pw.print(str);
            pw.flush();
        }
    }
}