#### Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

## Problem Description

Rar the cat hates counting and wants you to help. This time, he has an array of numbers not more than 1000000 length long. He also has *Q* queries. Each query will consist of a number, *x*. You are supposed to tell him how many numbers in the array are above and below *x*.

## Input

The first line of input consists of *L*, the length of the array.

The second line of input consists of *L* integers, space separated. You may assume they all fit into a 32bit signed integer.

The third line of input consists of *Q*, the number of queries. *Q* will be not more than 10000.

The following *Q* line of input consists of one number each, *x*. You may assume they all fit into a 32bit signed integer.

## Output

For each query, output how many numbers is smaller than it and how many numbers are greater than it (See Below).

## Sample Input

10 5 8 7 2 4 3 7 9 1 9 5 7 0 100 3 6

## Sample Output

Smaller: 5, Greater: 3 Smaller: 0, Greater: 10 Smaller: 10, Greater: 0 Smaller: 2, Greater: 7 Smaller: 5, Greater: 5

### Tags

### Subtasks and Limits

Subtask | Score | #TC | Time | Memory | Scoring |
---|---|---|---|---|---|

1 | 100 | 10 | 1s | 32MB | Average |

2 | 0 | 1 | 1s | 32MB | Average |

### Judge Compile Command

g++-7 ans.cpp -o arrayfind -Wall -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512