Problem Description
An array of integers is given. It is necessary to answer queries of the form: «How many numbers in the array have values from to inclusive?».
Input Format
The first line contains an integer --- the length of the array.
The second line contains integers --- the elements of the array.
The third line contains an integer --- the number of queries.
Then follow lines, each of which contains two integers and --- the bounds of the next query.
Output Format
For each query output one number --- the answer to it. Print all answers one per line.
Examples
Example 1
Input
5 7 1 8 10 5 6 2 100 4 7 1 9 1 10 2 4 9 9
Output
4 2 4 5 0 0