import java.util.Scanner;

public class Towers {

   
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
       int n,c=0;
       n=input.nextInt();
       String x;
       x=input.next();
       int y=(x.length()-11)/2;
       int b=x.lastIndexOf(8);
       b=x.length()-b;
        for (int i = 0; i < x.length(); i++) {
            if(x.charAt(i)=='8'){
                c++;
            }
        }
        String s=(b>=10 && c>y)? "yes":"no";
         System.out.println(s);
       
    }
    
}