{"id":"60b7e1b2-f306-4e12-8ebe-9d5829a10694","name":" I Hate 1111","description":"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)","inputFormat":"The first line contains an integer T, number of test cases.\r\nThe next t lines contain an integer a.","outputFormat":"For each test case print \"YES\" or \"NO\".","constraints":"1 <= t <= 10000\r\n1 <= x <= 10^9","sampleCode":{"cpp":{"code":""},"java":{"code":"\r\n\r\nimport java.util.*;\r\nimport java.util.function.Function;\r\nimport java.util.stream.Collectors;\r\nimport java.io.*;\r\nimport java.math.*;\r\n\r\npublic class Main {\r\n\t\tpublic static void main(String[] args) {\r\n\r\n\t}\r\n}\r\n"},"ruby":{"code":""},"python":{"code":""},"javascript":{"code":""}},"points":10,"difficulty":"medium","sampleInput":"3\r\n33\r\n144\r\n69\r\n","sampleOutput":"YES\r\nYES\r\nNO\r\n\r\n","questionVideo":"","hints":[],"associated":[],"solutionSeen":false,"tags":[],"meta":{"path":[{"id":0,"name":"home"},{"id":"0c54b191-7b99-4f2c-acb3-e7f2ec748b2a","name":"Data Structures and Algorithms","slug":"data-structures-and-algorithms","type":0},{"id":"086949fa-3c5e-40c6-8a9c-f9be4b400318","name":"Number Theory For Experts","slug":"number-theory-for-experts","type":0},{"id":"c406e72a-1c68-4993-b98b-2a51ad2de329","name":" I Hate 1111","slug":"i-hate-1111","type":1}],"next":{"id":"d8bd2d16-c0f4-4976-a080-a1eea0465200","name":"Relatively Prime Pairs","type":1,"slug":"relatively-prime-pairs"},"prev":{"id":"7895bed5-165d-490e-a881-1ccfc76b73fb","name":"Gcd Length","type":1,"slug":"gcd-length"}}}

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)

{"id":"60b7e1b2-f306-4e12-8ebe-9d5829a10694","name":" I Hate 1111","description":"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)","inputFormat":"The first line contains an integer T, number of test cases.\r\nThe next t lines contain an integer a.","outputFormat":"For each test case print \"YES\" or \"NO\".","constraints":"1 <= t <= 10000\r\n1 <= x <= 10^9","sampleCode":{"cpp":{"code":""},"java":{"code":"\r\n\r\nimport java.util.*;\r\nimport java.util.function.Function;\r\nimport java.util.stream.Collectors;\r\nimport java.io.*;\r\nimport java.math.*;\r\n\r\npublic class Main {\r\n\t\tpublic static void main(String[] args) {\r\n\r\n\t}\r\n}\r\n"},"ruby":{"code":""},"python":{"code":""},"javascript":{"code":""}},"points":10,"difficulty":"medium","sampleInput":"3\r\n33\r\n144\r\n69\r\n","sampleOutput":"YES\r\nYES\r\nNO\r\n\r\n","questionVideo":"","hints":[],"associated":[],"solutionSeen":false,"tags":[],"meta":{"path":[{"id":0,"name":"home"},{"id":"0c54b191-7b99-4f2c-acb3-e7f2ec748b2a","name":"Data Structures and Algorithms","slug":"data-structures-and-algorithms","type":0},{"id":"086949fa-3c5e-40c6-8a9c-f9be4b400318","name":"Number Theory For Experts","slug":"number-theory-for-experts","type":0},{"id":"c406e72a-1c68-4993-b98b-2a51ad2de329","name":" I Hate 1111","slug":"i-hate-1111","type":1}],"next":{"id":"d8bd2d16-c0f4-4976-a080-a1eea0465200","name":"Relatively Prime Pairs","type":1,"slug":"relatively-prime-pairs"},"prev":{"id":"7895bed5-165d-490e-a881-1ccfc76b73fb","name":"Gcd Length","type":1,"slug":"gcd-length"}}}
plane

Editor


Loading...

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)

Constraints

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

Format

Input

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

Output

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

Example

Sample Input

3 33 144 69

Sample Output

YES YES NO

Discussions

Show Discussion

Related Resources

related resources

Turning Off Zen Mode