A telephone number is a sequence of exactly 11 digits, where the first digit is 8. For example, the sequence 80011223388 is a telephone number, but the sequences 70011223388 and 80000011223388 are not.

You are given a string $s$ of length $n$, consisting of digits.

In one operation you can delete any character from string $s$. For example, it is possible to obtain strings 112, 111 or 121 from string 1121.

You need to determine whether there is such a sequence of operations (possibly empty), after which the string $s$ becomes a telephone number.


-----Input-----

The first line contains one integer $t$ ($1 \le t \le 100$) — the number of test cases.

The first line of each test case contains one integer $n$ ($1 \le n \le 100$) — the length of string $s$.

The second line of each test case contains the string $s$ ($|s| = n$) consisting of digits.


-----Output-----

For each test print one line.

If there is a sequence of operations, after which $s$ becomes a telephone number, print YES.

Otherwise, print NO.


-----Example-----
Input
2
13
7818005553535
11
31415926535

Output
YES
NO



-----Note-----

In the first test case you need to delete the first and the third digits. Then the string 7818005553535 becomes 88005553535.

Difficulty: interview

Starter code:

Solutions:
for _ in range(int(input())):
	n = int(input())
	s = input()
	for i in range(len(s)-10):
		if(s[i] == '8'):
			print("YES")
			break
	else:
		print("NO")		

N = int(input())

for i in range(N):
    l = int(input())
    
    S = input()
    
    if '8' in S and len(S) - S.index('8') >= 11:
        print("YES")
    else:
        print("NO")

n = int(input())
for i in range(n):
	t = int(input())
	s = input()
	f = False
	for j in range(t):
		if s[j] == '8':
			if t - j >= 11:
				f = True
	if f:
		print("YES")
	else:
		print("NO")


t = int(input())
for _ in range(t):
    n = int(input())
    s = input().strip()
    f = 0
    while f < n and s[f] != '8':
        f += 1
    if f == n or n - f < 11:
        print("NO")
    else:
        print("YES")


for i in range(int(input())):
    n=int(input())
    s=input()
    if '8' in s:
        if n-s.index('8')>=11:
            print ("YES")
        else :
            print("NO")
    else :
        print("NO")

for i in range(int(input())):
    n = int(input())
    s = input().strip()
    k = s.find('8')
    if k == -1:
        print('NO')
        continue
    s = s[k:]
    if len(s) >= 11:
        print('YES')
    else:
        print('NO')


for i in range(int(input())):
    n=int(input())
    s=input()
    if s.find('8')!=-1:
        k=s.find('8')
        if len(s)-k-1>=10:
            print('YES')
        else:
            print('NO')
    else:
        print('NO')

for _ in range(int(input())):
	input()
	num = input()
	if "8" in num and len(num) - num.find("8") >= 11:
		print("YES")
	else:
		print("NO")

t = int(input())

for _ in range(t):
    n = int(input())
    s = input()

    if '8' in s and n - s.find('8') >= 11:
        print('YES')
    else:
        print('NO')


t=int(input())
for l in range(t):
    n=int(input())
    s=str(input())
    flag=0
    for i in range(n):
        if(s[i]=='8'):
            if(n-i>=11):
                flag=1
                break
    if(flag==1):
        print("YES")
    else:
        print("NO")

for TT in range(1, int(input()) + 1):
    n = int(input())
    s = input()
    res = True
    if '8' not in s:
        res = False
    else:
        i = s.index('8')
        if n - i < 11:
            res = False
    print("YES" if res else "NO")

q = int(input())
for _ in range(q):
    n = int(input())
    u = list(map(int, list(input())))
    k = -1
    for i in range(n):
        if u[i] == 8:
            k = i
            break
    if k == -1:
        print('NO')
        continue
    if n - k >= 11:
        print('YES')
    else:
        print('NO')


def solve():
    n = int(input())
    s = input()
    for i in range(n):
        if s[i] == '8':
            break
    if i <= n - 11:
        print("YES")
    else:
        print("NO")

def main():
    for _ in range(int(input())):
        solve()
    return 0

main()

'''n=int(input())
s=input().rstrip()
p=input().rstrip().split(' ')
for i in range(0,n):
    o=int(input())
    u=input().rstrip().split(' ')'''

n=int(input())
for i in range(0,n):
    o=int(input())
    s=input().rstrip()
    x=list(s)
    if '8' not in x or len(x)<11:
        print("NO")
    else:
        f=x.index('8')
        g=x[f:len(x)]
        if len(g)>=11:
            print("YES")
        else:
            print("NO")


ts = int(input())

for ti in range(ts):
    n = int(input())
    s = input()
    pos = -1
    for i in range(n):
        if s[i] == "8":
            pos = i
            break
    if pos != -1 and n - pos >= 11:
        print("YES")
    else:
        print("NO")


t = int(input())

for i in range(t):
    n = int(input())
    s = input()
    if len(s) >= 11 and '8' in s[:-10]:
        print('YES')
    else:
        print('NO')


t = int(input())
for _ in range(t):
	n = int(input())
	s = input()
	try:
		s = s[s.index('8')::]
		if len(s)<11:
			raise ValueError
		print("YES")
	except ValueError:
		print("NO")

t = int(input())
for i in range(t):
  n = int(input())
  s = input()
  ok = False
  for i in range(n):
    if s[i] == '8' and i + 11 <= n:
      ok = True
      break
  if ok:
    print('YES')
  else:
    print('NO')

t = int(input())
for i in range(t):
    n = int(input())
    s = input()
    k = s.find('8')
    if k != -1 and len(s) - k >= 11:
        print("YES")
    else:
        print("NO")


for _ in range(int(input())):
	n = int(input())
	s = input()

	if '8' in s and n - s.find('8') >= 11:
		print("YES")
	else:
		print("NO")

t = int( input() )
for tc in range(t):
    n = int( input() )
    s = input()
    n = -1
    for c in s:
        if n >= 0:
            n += 1
        elif n == -1 and c == '8':
            n = 0
    print( "YES" if n >= 10 else "NO" )


for case in range(int(input())):
    n = int(input())
    s = input()
    ans = 'NO'
    for i in range(n-10):
        if s[i] == '8': 
            ans = 'YES'
            break
    print(ans)


t = int(input())
for _ in range(t):
    input()
    s = input()
    try:
        pos8 = s.index('8')
    except ValueError:
        print('NO')
    else:
        print('YES' if len(s) - pos8 >= 11 else 'NO')


t = int(input())
for i in range(t):
  n = int(input())
  s = input()
  st = False
  for i in range(n-1, -1, -1):
    if s[i]=='8' and n-i>=11:
      st = True
      break
  
  if st:
    print('YES')
  else:
    print('NO')