atcoder#ABC181D. [ABC181D] Hachi
[ABC181D] Hachi
Score : points
Problem Statement
Given is a digit sequence consisting of the digits from 1
through 9
.
Takahashi, the bee, loves multiples of .
He is trying to make a multiple of by permuting the digit sequence .
Determine whether it is possible.
Constraints
- Each character of is one of the digits from
1
through9
.
Input
Input is given from Standard Input in the following format:
Output
If it is possible to make a multiple of by permuting the digit sequence , print Yes
; otherwise, print No
.
1234
Yes
For example, permuting into results in a multiple of .
1333
No
There is no way to permute into a multiple of .
8
Yes