701_A. Cards_17234
There are n cards (n is even) in the deck. Each card has a positive integer written on it. n / 2 people will play new card game. At the beginning of the game each player gets two cards, each card is given to exactly one player. 

Find the way to distribute cards such that the sum of values written of the cards will be equal for each player. It is guaranteed that it is always possible.

Input

The first line of the input contains integer n (2 ≤ n ≤ 100) — the number of cards in the deck. It is guaranteed that n is even.

The second line contains the sequence of n positive integers a1, a2, ..., an (1 ≤ ai ≤ 100), where ai is equal to the number written on the i-th card.

Output

Print n / 2 pairs of integers, the i-th pair denote the cards that should be given to the i-th player. Each card should be given to exactly one player. Cards are numbered in the order they appear in the input.

It is guaranteed that solution exists. If there are several correct answers, you are allowed to print any of them.

Examples

Input

6
1 5 7 4 4 3


Output

1 3
6 2
4 5


Input

4
10 10 10 10


Output

1 2
3 4

Note

In the first sample, cards are distributed in such a way that each player has the sum of numbers written on his cards equal to 8. 

In the second sample, all values ai are equal. Thus, any distribution is acceptable.
import java.lang.*;
import java.io.*;
import java.util.*;


public class Cards {
	
	public static void main(String[] args) throws java.lang.Exception {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskA solver = new TaskA();
		solver.solve(in, out);
		out.close();
	}
}

class TaskA {
	
	public void solve(InputReader in, PrintWriter out) {
		int n = in.nextInt();
		// int[] c = new int[105];
		int[] a = new int[n+5];
		int s = 0;
		
		// Arrays.fill(c, 0);
		for (int i=1; i<=n; ++i) {
			a[i] = in.nextInt();
			s += a[i];
			// ++c[a[i]];
		}
		s /= (n/2);
		
		int i, j;
		
		for (i=1; i<=n; ++i) {
			if (a[i] < 0) continue;
			int x = a[i];
			a[i] = -1;
			for (j=1; j<=n; ++j) {
				if (a[j]>=0 && a[j]+x == s) {
					a[j] = -1;
					break;
				}
			}
			out.println(i + " " + j);
		}
	}
}

class InputReader {
	public BufferedReader reader;
	public StringTokenizer tokenizer;
	
	public InputReader(InputStream stream) {
		reader = new BufferedReader(new InputStreamReader(stream), 32768);
		tokenizer = null;
	}
	
	public String next() {
		while (tokenizer==null || !tokenizer.hasMoreTokens())  {
			try {
				tokenizer = new StringTokenizer(reader.readLine());
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
		}
		return tokenizer.nextToken();
	}
	
	public int nextInt() {
		return Integer.parseInt(next());
	}
	
	public long nextLong() {
		return Long.parseLong(next());
	}
	
	public double nextDouble() {
		return Double.parseDouble(next());
	}
}