When asked what his Favorite Number is, Joey cannot respond! He likes a lot of numbers! In particular, he has a list of ~N~ ~(1 \leq N \leq 100\,000)~ numbers that are his Favorite Numbers. Numbers might appear more than once on his list of Favorite Numbers, but that's okay, since it means that he really, really likes that number.
Joey is given ~Q~ ~(1 \leq Q \leq 100\,000)~ numbers, but these numbers might not be one his Favorite Numbers. For each number that he is given, he would like the smallest Favorite Number that is at least as large as the number he is given. He would also like to know how many times that Favorite Number appears in his list of Favorite Numbers.
Please help Joey!
The first line will contain ~N~: the size of Joey's list of Favorite Numbers.
The next line will contain ~N~ space-separated integers: the numbers that are in Joey's list of Favorite Numbers, in no particular order.
The next line will contain ~Q~: the amount of numbers Joey is given.
~Q~ lines of input will follow. Each line will contain one integer: one number that Joey is given.
The absolute value of any integer will not exceed ~10^9~. It is guaranteed that no number given to Joey will exceed the largest number in his list.
On separate lines, for each number that Joey is given, output two space-separated integers: the smallest Favorite Number that is at least as large as the number given, and how many times it appears in Joey's list of Favorite Numbers.
10 -2 8 -100 19 -2 -2 8 -100 8 8 5 6 8 17 -1000 -10
8 4 8 4 19 1 -100 2 -2 3