Water Problems 1
Time Limit : 1 Second
Memory Limit : 256 MB
Submission: 130
Solved: 42
- Description
skyjiange loves lucky numbers very much. Lucky numbers are positive integers whose decimal representation contains only lucky digits 4 and 7. For example, 4747 are lucky numbers while 4285 are not.
skyjiange want to by tickets, each ticket has a positive number which its length is n(n is even). A tickets is lucky if its number is lucky and the sum digits in the first half equals to the sum of digits in the second half. Help skyjiange judge whether the given ticket is lucky.
- Input
each line contains a ticket number, its length is even and won't exceed 50, process to the EOF.
- Output
print "YES" for lucky ticket. Otherwise, print "NO".
- sample input
-
47 4738 4774
- sample output
-
NO NO YES
- hint
- source