Difficult exam
Limits: 2 sec., 256 MiB
This statement was translated automatically from Ukrainian.
Zenyk has a very difficult linear algebra and analytic geometry exam today. Zenyk of course loves this subject very much, but studying it is incredibly difficult.
Yaroslav Mykhailovych, who teaches algebra and geometry, understands this, so he helps the students as much as he can. He introduced a rule that anyone who comes with a lucky ticket will automatically get the highest grade (5). A ticket is considered lucky if its number contains 47 as a substring. For example, the ticket numbered 12347568 is lucky, while 12374578 is not.
Zenyk wanted to prepare seriously, but how can you prepare when you are lazy. Therefore, he decided to go to sleep, and in the morning take a trolleybus to the university. He hopes that he will get a lucky ticket.
In the morning Zenyk got a ticket with the number \(n\). Tell whether he will pass the exam or
if he will have to retake it. If he passes the exam, print
YES, otherwise — NO.
Input
The single line contains a single integer \(n\) — the number of the ticket that Zenyk bought.
Output
In a single line, print YES if Zenyk got a lucky ticket.
If Zenyk’s ticket is not lucky, print NO.
Constraints
\(1 \le n \le 10^9\).
Samples
| Input (stdin) | Output (stdout) |
|---|---|
| 147 | YES |
| Input (stdin) | Output (stdout) |
|---|---|
| 4374 | NO |
Submit a solution
| Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
|---|
| Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
|---|