I Hate 1111

medium
You are given an integer x. Can you make x by summing up some number of 11,111,1111,11111,..?(You can use any number among them any number of times)

Input Format

The first line contains an integer T, number of test cases. The next t lines contain an integer a.

Output Format

For each test case print "YES" or "NO".

Constraints

1 <= t <= 10000
1 <= x <= 10^9

Example

Input
3
33
144
69
Output
YES
YES
NO

Previous
Gcd Length
Next
Relatively Prime Pairs

Related Questions