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

public class Solution {
	// fast scanner template
	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());
		}

		long[] readArrayLong(int n) {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}

		int[] readArrayInt(int n) {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}

		long nextLong() {
			return Long.parseLong(next());
		}
	}

	// sorting template
	static void sortLong(long[] a) {
		ArrayList<Long> l = new ArrayList<>();
		for (long i : a)
			l.add(i);
		Collections.sort(l);
		for (int i = 0; i < a.length; i++)
			a[i] = l.get(i);
	}

	static void sortInt(int[] a) {
		ArrayList<Integer> l = new ArrayList<>();
		for (int i : a)
			l.add(i);
		Collections.sort(l);
		for (int i = 0; i < a.length; i++)
			a[i] = l.get(i);
	}

	static class Graph {
		private LinkedList<Integer> adj[];
		public String s;
		public String match;

		Graph(int n) {
			adj = new LinkedList[n];
			for (int i = 0; i < n; i++) {
				adj[i] = new LinkedList<>();
			}
		}

		void addEdges(int u, int v) {
			adj[u].add(v);
		}

		int dfsUtil(int v, boolean[] vis) {
			int count = 0;
			vis[v] = true;
			Stack<Integer> stack = new Stack<>();
			stack.push(v);
			while (stack.empty() == false) {
				int x = stack.peek();
				stack.pop();
				if (vis[x] != true) {
					vis[x] = true;
					if (this.s.charAt(x) == this.match.charAt(0)) {
						count++;
					}
				}
				Iterator<Integer> it = adj[x].listIterator();
				while (it.hasNext()) {
					int n = it.next();
					if (!vis[n])
						stack.push(n);
				}
			}
			return count;
		}
	}

	static class Pair<F, S> {
		F first;
		S second;

		Pair(F first, S second) {
			this.first = first;
			this.second = second;
		}

		public F getFirst() {
			return this.first;
		}

		public S getSecond() {
			return this.second;
		}
		// Sort on basis of first term, reverse p1.first and p2.first to sort in desc
		// Collections.sort(a, (p1, p2) -> (p1.first - p2.first));

		// Sort on the basis of second term, reverse p1.second and p2.second to sort in
		// desc
		// Collections.sort(a, (p1, p2) -> (p1.second - p2.second));
	}

	// main code
	public static void main(String[] args) throws IOException {
		FastScanner fs = new FastScanner();
		int t = fs.nextInt();
		StringBuilder res = new StringBuilder();
		while (t-- > 0) {
			int n = fs.nextInt();
			String s = fs.next();
			if (s.substring(0, 4).equals("2020")) {
				res.append("YES\n");
			}
			else if (s.substring(s.length() - 4).equals("2020")) {
				res.append("YES\n");
			}
			else if (s.substring(0, 1).equals("2") && s.substring(s.length() - 3).equals("020")) {
				res.append("YES\n");
			}
			else if (s.substring(0, 2).equals("20") && s.substring(s.length() - 2).equals("20")) {
				res.append("YES\n");
			}
			else if (s.substring(0, 3).equals("202") && s.substring(s.length() - 1).equals("0")) {
				res.append("YES\n");
			}
			else
				res.append("NO\n");
		}
		System.out.println(res);
	}

	static int __gcd(int a, int b) {
		if (b == 0)
			return a;
		return __gcd(b, a % b);
	}
}
