HZNUOJ

Little Sub and Counting

Tags:
Time Limit:  1 s      Memory Limit:   256 MB
Submission:1797     AC:221     Score:85.14

Description

Little Sub likes Math. Now he has a simple counting problem for you.
Given an positive integer sequence A, for each Ai, Please calculate how many elements Aj in the sequence satisfied Ai^Aj > Aj^Ai.

Input


The first line contains one positive integer n(1 ≤ n ≤ 100000).

The following line contains n positive integers Ai(1 ≤ Ai ≤ 2^31 − 1).


Output

Please output n integer in one line and separate them by a single space. The ith integer indicates the answer concerning Ai.

Samples

input
3 1 2 5
output
0 2 1

Author

CHEN, Jingbang