You are required to collect N numbers from a bag. Initially, the bag is empty. Whenever you put a number X in the bag, then the owner of the bag asks the question.
The questions are as follows:
If you answer both the questions correctly, then you can put X inside the bag. Your task is to answers the questions that are asked by the owner of the bag.
Input format
Output format
For every integer X, print the answers of the questions, in the form of space-separated integers, that are asked by the owner of the bag. If no such numbers exist in the bag, then print −1.
Constraints
1≤N≤1051≤X≤109
All Xs are distinct.
Initially, the bag is empty so for the first integer X=1 the answer to the first question is −1 similarly for the second question.
For X=4 the greatest number smaller than 4 is 1and there is no number greater than 4 is present in the bag So the answer to the second question will be −1.