Game with Telephone Numbers

题意翻译

## 题目描述 一个数字序列$s$是电话号码,当且仅当$|s|=11$ (长度为$11$),并且第一位是$8$。 ```Vasya``` 和 ```Petya``` 在玩一个游戏,最初他们有一个长度为 $n$ 的数字序列 $s$。两人轮流对当前序列进行操作,每次操作必须从当前序列选中一个数字将它删去。```Vasya``` 先手,```Petya```后手。 比如当前数字序列为```1121``` ,下一轮可能变成 ```111``` ,```121``` ,```112```。 当 $|s|=11$ 时游戏结束,如果**最后的** $s$ 是电话号码,那么 ```Vasya``` 赢,否则 ```Petya``` 赢。 而您需要判断 ```Vasya``` 有没有必胜策略。 ## 输入输出格式 ### 输入格式 第一行 $n(13 \leq n \leq 10^5 ,n$是奇数$)$ 第二行 一个数字序列 $s (|s|=n)$ ### 输出格式 如果 ```Vasya``` 有必胜策略,输出```YES```,否则输出```NO``` ## 说明 样例 $1$ 中 ```Vasya``` 应该删掉第二个字符,字符串变为 $880011223344$。此后无论```Petya```如何操作,开头都会是$8$。 样例 $2$ 中 ```Petya``` 可以在 ```Vasya``` 之后立即删去开头的$8$,这样序列中根本就不存在$8$了。

题目描述

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).

输入输出格式

输入格式


The first line contains one integer $ n $ ( $ 13 \le 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.

输出格式


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

输入输出样例

输入样例 #1

13
8380011223344

输出样例 #1

YES

输入样例 #2

15
807345619350641

输出样例 #2

NO

说明

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.