Jane is a very popular magician. But to perform a magic he needs the magical numbers. The magical numbers are the positive integers whose decimal representations contain the magical digits 1 and 2. For example, numbers 11, 2 are magical numbers and 7, 36 are not. But all numbers containing 1 and 2 are not magical. Jane calls a number, magical number, if the count of magical digits in it contains the magical digits only. Help Jane to find the magical number.
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains 1 line contains an integer n.
Print on the new line "YES" if n is a magical number. Otherwise, print "NO".
Example: Input: 4
Explanation: In the first example there are 2 magic digits, 2 is magic number, so the answer is "YES".
In the second example there is no magic digit, so the answer is "NO".