Score : $400$ points
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.
1
through 9
.Input is given from Standard Input in the following format:
$S$
If it is possible to make a multiple of $8$ by permuting the digit sequence $S$, print Yes
; otherwise, print No
.
1234
Yes
For example, permuting $1234$ into $1432$ results in a multiple of $8$.
1333
No
There is no way to permute $1333$ into a multiple of $8$.
8
Yes