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.
import java.io.*;
import java.text.DecimalFormat;
import java.util.*;
public class l {
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////                                                                                                               /////////
////////                                                                                                               /////////
////////   HHHH        HHHH  EEEEEEEEEEEEE   MMMM          MMMM         OOOOOO             SSSSSSS      EEEEEEEEEEEEE  /////////
////////   HHHH        HHHH  EEEEEEEEEEEEE   MMMMMM      MMMMMM      OOO      OOO        SSSS   SSS     EEEEEEEEEEEEE  /////////
////////   HHHH        HHHH  EEEEE           MMMM MMM  MMM MMMM    OOO          OOO    SSSS       SSS   EEEEE          /////////
////////   HHHH        HHHH  EEEEE           MMMM  MMMMMM  MMMM   OOO            OOO   SSSS             EEEEE          /////////
////////   HHHH        HHHH  EEEEE           MMMM          MMMM  OOO              OOO   SSSSSSS         EEEEE          /////////
////////   HHHHHHHHHHHHHHHH  EEEEEEEEEEE     MMMM          MMMM  OOO              OOO      SSSSSS       EEEEEEEEEEE    /////////
////////   HHHHHHHHHHHHHHHH  EEEEEEEEEEE     MMMM          MMMM  OOO              OOO         SSSSSSS   EEEEEEEEEEE    /////////
////////   HHHH        HHHH  EEEEE           MMMM          MMMM   OOO            OOO              SSSS  EEEEE          /////////
////////   HHHH        HHHH  EEEEE           MMMM          MMMM    OOO          OOO     SSS       SSSS  EEEEE          /////////
////////   HHHH        HHHH  EEEEEEEEEEEEE   MMMM          MMMM      OOO      OOO        SSS    SSSS    EEEEEEEEEEEEE  /////////
////////   HHHH        HHHH  EEEEEEEEEEEEE   MMMM          MMMM         OOOOOO             SSSSSSS      EEEEEEEEEEEEE  /////////
////////                                                                                                               /////////
////////                                                                                                               /////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    static int mod = (int) (1e9 + 7);
    static int n;
    static StringBuilder sol;

    static class pair implements Comparable<pair> {
        int val, cost;

        public pair(int x, int y) {
            val = x;
            cost = y;
        }

        public int compareTo(pair o) {
            if (o.val == val) return cost - o.cost;
            return val - o.val;
        }

        public String toString() {
            return val + " " + cost;
        }
    }

    static class tri implements Comparable<tri> {
        int lef, righ, idx;

        tri(int a, int b, int c) {
            lef = a;
            righ = b;
            idx = c;
        }

        public int compareTo(tri o) {
            if (lef == o.lef) return righ - o.righ;
            return lef - o.lef;
        }

        public String toString() {
            return lef + " " + righ + " " + idx;
        }
    }
    static ArrayList<Integer>[]adj;
    static boolean[]vis;
    static ArrayList<Integer>ans;
    static void dfs(int u){
        vis[u]=true;
        ans.add(u+1);
        for (int v:adj[u]){
            if (!vis[v])dfs(v);
        }
    }

    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        //FileWriter f = new FileWriter("C:\\Users\\Ibrahim\\out.txt");
        PrintWriter pw = new PrintWriter(System.out);
        int n = sc.nextInt();
        char[]s = sc.nextLine().toCharArray();
        LinkedList<Integer>et= new LinkedList<>();
        for (int i =0;i<s.length;i++){
            if (s.length-i<11)break;
            if (s[i]=='8'){
                et.add(i);
            }
        }
        if (et.isEmpty()){
            pw.println("NO");
        }
        else {
            int l = s.length;
            boolean is =true;
            while (true){
                l--;
                if (l==11)
                    break;
                if (et.isEmpty())break;
                et.removeFirst();
                l--;
                if (l==11)break;
            }
            if (et.size()==0)is=false;
            pw.println(is?"YES":"NO");
        }
        pw.flush();
    }

    static final int R = 26;                //Alphabet (lowercase etters in below implementation)

    static class Node {
        Node[] next = new Node[R];
        int val = -1;
        int count=0;
    }

    static Node root ;
    static int[]mm;
    static void put(char[] s, int idx)        // O(n) where n = |s|. Can be implemented recursively
    {
        Node cur = root;
        int i =1;
        for (char c : s) {
            Node nxt = cur.next[c - 'a'];
            if (nxt == null)
                nxt = cur.next[c - 'a'] = new Node();
            cur = nxt;
            cur.count++;
            mm[i]=Math.max(mm[i],cur.count);
            i++;
        }
        cur.val = idx;
    }

    static int search(char[] s) {
        Node cur = root;
        for (char c : s) {
            Node nxt = cur.next[c - 'a'];
            if (nxt == null)
                return -1;
            cur = nxt;
        }
        return cur.val;
    }

    static class Scanner {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(FileReader r) {
            br = new BufferedReader(r);
        }

        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }

        public int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

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

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if (x.charAt(0) == '-') {
                neg = true;
                start++;
            }
            for (int i = start; i < x.length(); i++)
                if (x.charAt(i) == '.') {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                } else {
                    sb.append(x.charAt(i));
                    if (dec)
                        f *= 10;
                }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg ? -1 : 1);
        }

        public boolean ready() throws IOException {
            return br.ready();
        }
    }
}