EasyRating 800
Nearly Lucky
Lucky digits are 4 and 7. A number is nearly lucky if the count of its lucky digits is itself 4 or 7. Print YES or NO.
Input
One number (up to 18 digits).
Output
YES or NO.
Sample 1
Input
40047
Output
NO
Sample 2
Input
7747774
Output
YES
Output appears here