Light Version of a Famous Task
Time limit3sMemory limit256 MB
For each c up to 10^18, decide whether some a+b=c gives rad(a*b*c) < c, where rad is the product of distinct primes.
- Level
Medium6 of 10
- Topics
- Number theory, Math, Brute force, Implementation
- Solved
- No attempts yet
Problem
The ABC conjecture (also known as the Oesterlé-Masser conjecture) is a famous conjecture in number theory, first proposed by Joseph Oesterlé and David Masser. It is stated as follows:
For every positive real number , there are only finitely many positive integer triples such that
- and are relatively prime;
- ; and
- ,
where is the product of all distinct prime divisors of .
Shinichi Mochizuki claimed to have proven this conjecture in August 2012. Later, Mochizuki's claimed proof was announced to be published in Publications of the Research Institute for Mathematical Sciences (RIMS), a journal of which Mochizuki is the chief editor.
Spike is a great fan of number theory and wanted to prove the ABC conjecture as well. However, due to his inability, he turned to work on a weaker version of the ABC conjecture, which is stated as follows:
Given a positive integer , determine if there exist positive integers , such that and .
Note that in the original ABC conjecture, the positive integers and are required to be relatively prime. However, as Spike is solving an easier version of the problem, this requirement is removed.
Input
The first line of input contains one integer , the number of test cases.
The next lines contain description of the test cases. Each test case contains one line, including an integer .
Output
For each test case, if there exist two positive integers satisfying and , then output yes in a line, otherwise output no instead.
Hint
For the first test case, we have and .
For the second test case, we have and .
For the third test case, there's no solution.