Say thanks to gachn (EASY)

0

0 votes
Very-Easy
Problem

CYPHER team is known for setting really hard questions for their contest, and today's contest is the best example to justify it. But gachn always fight to keep at least one easy question in the contest so he came up with a question related to prime number which is quite easy.

enter image description here

So the question is you are given a integer N and your task is to find out two prime Number A and B such there are exactly N prime number between them(including A and B).Now there can be multiple answer for the same so you have to also make sure that the difference between A and B is minimal.

INPUT FORMAT:

  • first line of input contain T denoting the number of test cases.
  • each of the next T lines contain an integer N.

OUTPUT FORMAT:

  • For each test case print two space seperated integer A and B as explained in the question.

CONSTRAINS:

1<=T<=105

2<=N<=3*105

Time Limit: 3
Memory Limit: 256
Source Limit:
Explanation

Test Case 1: There are 2 prime number between 2 3 both inclusive where difference between them is minimum 3-2 = 1
Test Case 2: There are 3 prime number between 2 5 both inclusive where difference between them is minimum 5-2 = 3

Editor Image

?