AND PLUS OR

아직 제출이 없습니다시간 제한3초메모리 제한1024 MB

문제

For two nonnegative integers a,ba, b, let aba \wedge b be their bitwise AND, and aba \vee b be their bitwise OR.

You are given an array A_0,A_1,,A_2N1A\_0, A\_1, \ldots, A\_{2^N - 1} of length 2N2^N consisting of nonnegative integers. Please find a pair of indices 0i,j2N10 \le i, j \le 2^N - 1 such that A_i+A_j<A_ij+A_ijA\_{i} + A\_{j} < A\_{i \wedge j} + A\_{i \vee j}, or state that no such pair exists. If there is more than one such pair, print any.

입력

The first line contains an integer NN.

The second line contains 2N2^N integers, the array AA given in order.

출력

If there is an answer, output two integers i,ji, j denoting the answer, separated by spaces. i,ji, j should be in the range \[0,2N1]\[0, 2^N - 1]. Otherwise, output -1.

제한

  • 0N200 \leq N \leq 20
  • 0A_i1070 \leq A\_i \leq 10^7