The GRAND coding challenge of 2k13 CODEZILLA is here!
This time the ACM members decided that the participants will be allotted ID numbers formed by concatenation of numbers 1, 14 and 144 only.
For Example:141144,11114144 are valid IDs but 5,1514,411 are not.
The list was prepared accordingly but it got mixed up with another list.
As we are short of time we turn to you, the BUDDING CODERS, for help.
All you need to do is given a number, if it is a valid ID number print "YES", else print "NO".
The first line will contain a number T, the number of test cases.
Following T lines will each contain a number N. You have to check if this is a valid ID according to the rules given above.
For each test case,on a separate line,print "YES" if valid and "NO" if not .
Problem Setter : Shradha Chhaparia
Problem Tester : Shikhar Sharad