시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 2048 MB166483227.826%

문제

You are given an array $a$ of $n$ integers. Find any index $i$ ($1 \le i \le n$) such that the element $a_i$ equals to the geometric mean of all the other elements. In other words, find any index $i$ that satisfies the following formula: $$ a_i = \root{n-1}\of{\prod_{\substack{k=1 \\ k \neq i}}^n a_k}\text{.} $$

입력

The first line contains one integer $n$ ($2 \leq n \leq 10^5$): the length of the array.

The second line contains $n$ integers $a_1, a_2, \ldots, a_n$ ($a_k \geq 1$; the total number of digits in all numbers does not exceed $300\,000$).

It is guaranteed that the answer exists for the given array.

출력

Output one integer: the index of the element that equals to geometric mean of the others items. It there are several answers, output any one of them.

예제 입력 1

5
2 4 8 16 32

예제 출력 1

3

예제 입력 2

2
123456789012345678901234567890 123456789012345678901234567890

예제 출력 2

2