human
A telephone number is a sequence of exactly 11 digits such that its first digit is 8.

Vasya and Petya are playing a game. Initially they have a string s of length n (n is odd) consisting of digits. Vasya makes the first move, then players alternate turns. In one move the player must choose a character and erase it from the current string. For example, if the current string 1121, after the player's move it may be 112, 111 or 121. The game ends when the length of string s becomes 11. If the resulting string is a telephone number, Vasya wins, otherwise Petya wins.

You have to determine if Vasya has a winning strategy (that is, if Vasya can win the game no matter which characters Petya chooses during his moves).

Input

The first line contains one integer n (13 ≤ n < 10^5, n is odd) — the length of string s.

The second line contains the string s (|s| = n) consisting only of decimal digits.

Output

If Vasya has a strategy that guarantees him victory, print YES.

Otherwise print NO.

Examples

Input

13
8380011223344

Output

YES

Input

15
807345619350641

Output

NO

Note

In the first example Vasya needs to erase the second character. Then Petya cannot erase a character from the remaining string 880011223344 so that it does not become a telephone number.

In the second example after Vasya's turn Petya can erase one character character 8. The resulting string can't be a telephone number, because there is no digit 8 at all.
The above is tricky. Write me a correct solution in PYTHON3.
 Can you provide a Python program to determine if Vasya has a winning strategy (that is, if Vasya can win the game no matter which characters Petya chooses during his moves)?
assistant
#Here is Python program to determine if Vasya has a winning strategy (that is, if Vasya can win the game no matter which characters Petya chooses during his moves).

#import sys
# import math
# import bisect
# import collections
# import itertools
# #from sys import stdin,stdout
# from math import gcd,floor,sqrt,log
# from collections import defaultdict as dd, Counter as ctr
# from bisect import bisect_left as bl, bisect_right as br
# from itertools import permutations as pr, combinations as cb

#sys.setrecursionlimit(100000000)

#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$

inp    = lambda: int(input())
# strng  = lambda: input().strip()
# jn     = lambda  x,l: x.join(map(str,l))
strl   = lambda: list(input().strip())
# mul    = lambda: map(int,input().strip().split())
# mulf   = lambda: map(float,input().strip().split())
seq    = lambda: list(map(int,input().strip().split()))
#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$#$
# p_inf = float('inf')
# n_inf = float('-inf')
#To find mex 
# def mex(arr):
#     nList = set(arr)
#     mex = 0
#     while mex in nList:
#         mex += 1
#     return(mex)

def results(arr, n):
    if(n < 11):
        return('NO')
    if(n == 11):
        if(arr[0] == 8):
            return('YES')
        return('NO')
    cnt = 0
    mov = n - 11
    my = (n - 11) // 2
    cnt2 = 0
    for i in range(n):
        if(arr[i] == '8'):
            cnt += 1
            if(i > mov):
                cnt2 += 1
    if(cnt < my):
        return('NO')
    else:
        if(cnt - cnt2 > my):
            return('YES')
        return('NO')

def main():
    n = inp()
    a = input()
    result = results(a, n)
    print(result)

if __name__ == '__main__':
    main()