#CCBCHBAHAI0000108. Number Frequence

Number Frequence

Number Frequence

Source: beecrowd

Version: Phuoc Hung OJ Extended

Problem

Given nn integers x1,…,xnx_1,\ldots,x_n with 1≤xi≤20001\le x_i\le2000, define f(v)=∣{i:xi=v}∣f(v)=|\{i:x_i=v\}|. For every value with positive frequency, print the value and its count in increasing order of the value. The small value domain is intended to be handled with a frequency array.

Input

The first line contains nn. The second line contains nn integers. No value occurs more than 20 times.

Output

For each present value vv, print exactly v aparece f(v) vez(es) in increasing order.

Subtask

Subtask 1 (20 points): 1≤n≤201\le n\le20.

Subtask 2 (30 points): 1≤n≤20001\le n\le2000.

Subtask 3 (50 points): 1≤n≤400001\le n\le40000, 1≤xi≤20001\le x_i\le2000, each value occurs at most 20 times.

Example

Input

7
8 10 8 260 4 10 10

Output

4 aparece 1 vez(es)
8 aparece 2 vez(es)
10 aparece 3 vez(es)
260 aparece 1 vez(es)

Explanation

The present values are 4, 8, 10, and 260 with frequencies 1, 2, 3, and 1.