Welcome to ZOJ
Select Problem
ZOJ Problem Set - 4099
Extended Twin Composite Number

Time Limit: 1 Second      Memory Limit: 65536 KB      Special Judge

Do you know the twin prime conjecture? Two primes $a$ and $b$ are called twin primes if $a + 2 = b$. The twin prime conjecture is an unsolved problem in mathematics, which asks for a proof or a disproof for the statement "there are infinitely many twin primes".

On April 17, 2013, Yitang Zhang announced a proof that for some integer $c$ that is less than 70 million, there are infinitely many pairs of primes that differ by $c$. As of April 14, 2014, one year after Zhang's announcement, the bound has been reduced to 246. People are hoping for the bound to be smaller and smaller, so that a proof for the conjecture can finally be found.

For our dear contestants, we've prepared another similar problem for you, which is the extended twin composite number problem: Given a positive integer $n$, find two integers $x$ and $y$ such that $x + n = y$ and both $x$ and $y$ are composite numbers.


There are multiple test cases. The first line of the input contains an integer $T$ (about $10^5$), indicating the number of test cases. For each test case:

The only line contains one integer $n$ ($1 \leq n \leq 10^{9}$).


For each test case output two integers in one line, indicating $x$ and $y$ where $1 \leq x, y \leq 10^{18}$. If there are multiple valid answers, you can print any of them; If there is no valid answer, output "-1" (without quotes) instead.

Sample Input


Sample Output

4 15
114514 1919810
111234 5678999

Author: JIN, Mengge
Source: The 19th Zhejiang University Programming Contest Sponsored by TuSimple
Submit    Status