#C9855. Almost Special Number
Almost Special Number
Almost Special Number
A number is considered almost special if it meets the following two conditions:
(1) All of its digits are chosen from the set ({2, 5, 9}).
(2) It contains at least one occurrence of each digit: 2, 5, and 9.
Given an input number represented as a string (which may be arbitrarily large), determine if it is almost special. If the number is almost special, print YES
; otherwise, print NO
.
inputFormat
The input is provided via standard input. It consists of a single line containing a string of digits representing the number.
outputFormat
Output to standard output a single word: YES
if the number is almost special, otherwise NO
.## sample
259
YES
</p>