Redirecting to
NADOS

I Hate 1111

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".
Question Video
Constraints
1 <= t <= 10000
1 <= x <= 10^9
Sample Input
3
33
144
69
Sample Output
YES
YES
NO



  • Asked in Companies
  • Related Topics






Video Solution

Code Solution

Run
 
Run
Id Name