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 sys
from functools import reduce
from collections import Counter
import time
import datetime
import math 

# def time_t():
#     print("Current date and time: " , datetime.datetime.now())
#     print("Current year: ", datetime.date.today().strftime("%Y"))
#     print("Month of year: ", datetime.date.today().strftime("%B"))
#     print("Week number of the year: ", datetime.date.today().strftime("%W"))
#     print("Weekday of the week: ", datetime.date.today().strftime("%w"))
#     print("Day of year: ", datetime.date.today().strftime("%j"))
#     print("Day of the month : ", datetime.date.today().strftime("%d"))
#     print("Day of week: ", datetime.date.today().strftime("%A"))

def ip(): return int(sys.stdin.readline())

# def sip(): return sys.stdin.readline()
def sip() : return input()

def mip(): return map(int,sys.stdin.readline().split())

def mips(): return map(str,sys.stdin.readline().split())

def lip(): return list(map(int,sys.stdin.readline().split()))

def matip(n,m):
    lst=[]
    for i in range(n):
        arr = lip()
        lst.insert(i,arr)
    return lst

def factors(n): # find the factors of a number
    return list(set(reduce(list.__add__, ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0))))

def minJumps(arr, n): #to reach from 0 to n-1 in the array in minimum steps
    jumps = [0 for i in range(n)]
    if (n == 0) or (arr[0] == 0):
        return float('inf')
    jumps[0] = 0
    for i in range(1, n):
        jumps[i] = float('inf')
        for j in range(i):
            if (i <= j + arr[j]) and (jumps[j] != float('inf')):
                jumps[i] = min(jumps[i], jumps[j] + 1)
                break
    return jumps[n-1]

def dic(arr): # converting list into dict of count
    return Counter(arr)

def check_prime(n):
    if n<2:
        return False
    for i in range(2,int(n**(0.5))+1,2):
        if n%i==0:
            return False
    return True 

# --------------------------------------------------------- #
# sys.stdin = open('input.txt','r')
# sys.stdout = open('output.txt','w')
# --------------------------------------------------------- #

t = ip()
while t:
    t-=1
    n = ip()
    s = sip()
    if s[0]=='2' and s[1]=='0' and s[2]=='2' and s[3]=='0':
        print('YES')
    elif s[-1]=='0' and s[-2]=='2' and s[-3]=='0' and s[-4]=='2':
        print("YES")
    elif s[0]=='2' and s[-1]=='0' and s[-2]=='2' and s[-3]=='0':
        print('YES')
    elif s[0]=='2' and s[1]=='0' and s[-1]=='0' and s[-2]=='2':
        print('YES')
    elif s[0]=='2' and s[1]=='0' and s[2]=='2' and s[-1]=='0':
        print('YES')
    else:
        print('NO')
# print(time.process_time())