Equal Range
For a given sequence A={a0,a1,...,an−1} which is sorted by ascending order, print a pair of the lower bound and the upper bound for a specific value k given as a query.
lower bound: the place pointing to the first element greater than or equal to a specific value, or n if there is no such element.
upper bound: the place pointing to the first element greater than a specific value, or n if there is no such element.
The input is given in the following format.
n
a0 a1,...,an−1
q
k1
k2
:
kq
The number of elements n and each element ai are given in the first line and the second line respectively.
In the third line, the number of queries q is given and the following q lines, q integers ki are given as queries.
For each query, print the pari of the lower bound l (l=0,1,...,n) and upper bound r (r=0,1,...,n) separated by a space character in a line.
1≤n≤100,000
1≤q≤200,000
0≤a0≤a1≤...≤an−1≤1,000,000,000
0≤ki≤1,000,000,000