P24063 [AtCoder] Hachi
普及-
题目描述

Problem Statement

Given is a digit sequence S consisting of the digits from 1 through 9.
Takahashi, the bee, loves multiples of 8.
He is trying to make a multiple of 8 by permuting the digit sequence S.
Determine whether it is possible.

Input

Input is given from Standard Input in the following format:
S

Output

If it is possible to make a multiple of 8 by permuting the digit sequence S, print Yes; otherwise, print No.

Constraints

  • $1 \leq |S| \leq 2 \times 10^5$
  • Each character of S is one of the digits from 1 through 9.

Sample Input 1

1234

Sample Output 1

Yes

For example, permuting 1234 into 1432 results in a multiple of 8.

Sample Input 2

1333

Sample Output 2

No

There is no way to permute 1333 into a multiple of 8.

Sample Input 3

8

Sample Output 3

Yes

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
1234
样例输出
Yes