#CCBCHBAHAI0000097. Suy kích thước mảng khi bỏ size trong declaration

Suy kích thước mảng khi bỏ size trong declaration

Inferring Array Size from an Omitted Size

Source: Phuoc Hung OJ

Version: Phuoc Hung OJ Extended

Problem

Consider a C array declaration whose size is omitted:

int a[] = {v0, v1, ..., v(n-1)};

The initializer list contains exactly nn elements. Therefore the inferred array size is

N=n,N=n,

and, with 0-based indexing, the valid index set is

{0,1,…,N−1}.\{0,1,\ldots,N-1\}.

Output the inferred size NN and the largest valid index.

Input

The first line contains nn. The second line contains exactly nn initializer values.

Output

Print NN and N−1N-1.

Subtask

Subtask 1 (20 points): 1≤n≤101\le n\le10.

Subtask 2 (30 points): 1≤n≤1001\le n\le100.

Subtask 3 (50 points): 1≤n≤10001\le n\le1000.

Example

Input

5
7 2 9 -1 4

Output

5 4

Explanation

There are 5 initializer elements, so the inferred size is 5 and the last valid index is 4.