Problem: It's time polar bears Menshykov and Uslada from the zoo of St. Petersburg and elephant Horace from the zoo of Kiev got down to business. In total, there are n tasks for the day and each animal should do each of these tasks. For each task, they have evaluated its difficulty. Also animals decided to do the tasks in order of their difficulty. Unfortunately, some tasks can have the same difficulty, so the order in which one can perform the tasks may vary.

Menshykov, Uslada and Horace ask you to deal with this nuisance and come up with individual plans for each of them. The plan is a sequence describing the order in which an animal should do all the n tasks. Besides, each of them wants to have its own unique plan. Therefore three plans must form three different sequences. You are to find the required plans, or otherwise deliver the sad news to them by stating that it is impossible to come up with three distinct plans for the given tasks.

Input

The first line contains integer n (1 ≤ n ≤ 2000) — the number of tasks. The second line contains n integers h1, h2, ..., hn (1 ≤ hi ≤ 2000), where hi is the difficulty of the i-th task. The larger number hi is, the more difficult the i-th task is.

Output

In the first line print "YES" (without the quotes), if it is possible to come up with three distinct plans of doing the tasks. Otherwise print in the first line "NO" (without the quotes). If three desired plans do exist, print in the second line n distinct integers that represent the numbers of the tasks in the order they are done according to the first plan. In the third and fourth line print two remaining plans in the same form.

If there are multiple possible answers, you can print any of them.

Examples

Input

4
1 3 3 1


Output

YES
1 4 2 3 
4 1 2 3 
4 1 3 2 


Input

5
2 4 1 4 8


Output

NO

Note

In the first sample the difficulty of the tasks sets one limit: tasks 1 and 4 must be done before tasks 2 and 3. That gives the total of four possible sequences of doing tasks : [1, 4, 2, 3], [4, 1, 2, 3], [1, 4, 3, 2], [4, 1, 3, 2]. You can print any three of them in the answer.

In the second sample there are only two sequences of tasks that meet the conditions — [3, 1, 2, 4, 5] and [3, 1, 4, 2, 5]. Consequently, it is impossible to make three distinct sequences of tasks.

Solution (in JAVA):

Solution:
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Scanner;

public class Main3 {
	MyScanner sc = new MyScanner();
	Scanner sc2 = new Scanner(System.in);
	long start = System.currentTimeMillis();
	long fin = System.currentTimeMillis();
	final int MOD = 1000000007;
	int[] dx = { 1, 0, 0, -1 };
	int[] dy = { 0, 1, -1, 0 };

	void run() {
		int n = sc.nextInt();
		Pair[] p = new Pair[n];
		for (int i = 0; i < n; i++) {
			p[i] = new Pair(sc.nextInt(), i + 1);
		}
		Arrays.sort(p);
		int[] h = new int[2001];
		for (Pair ele : p) {
			h[ele.difficult]++;
		}
		int cnt = 0;
		boolean  done = false;
		for (int i = 0; i < 2001; i++) {
			if (h[i] >= 3) {
				System.out.println("YES");
				String res1 = "";
				String res2 = "";
				String res3 = "";
				for (int j = 0; j < p.length; j++) {
					if (!done && h[p[j].difficult] >= 3) {
						done = true;
						res1 += p[j].task + " ";
						res1 += p[j + 1].task + " ";
						res1 += p[j + 2].task + " ";
						res2 += p[j + 1].task + " ";
						res2 += p[j].task + " ";
						res2 += p[j + 2].task + " ";
						res3 += p[j + 2].task + " ";
						res3 += p[j].task + " ";
						res3 += p[j + 1].task + " ";
						j += 2;
					} else {
						res1 += p[j].task + " ";
						res2 += p[j].task + " ";
						res3 += p[j].task + " ";
					}
				}
				System.out.println(res1);
				System.out.println(res2);
				System.out.println(res3);
				return;
			}
			if (h[i] == 2) {
				cnt++;
			}
		}
		if (cnt < 2) {
			System.out.println("NO");
			return;
		}
		System.out.println("YES");
		ArrayList<String> list = new ArrayList<String>();
		String res = "";
		for (int i = 0; i < p.length; i++) {
			res += p[i].task + " ";
		}
		System.out.println(res);
		res = "";
		int use = -1;
		done = false;
		for (int i = 0; i < p.length; i++) {
			if (!done && h[p[i].difficult] == 2) {
				res += p[i + 1].task + " ";
				res += p[i].task + " ";
				use = p[i].difficult;
				i++;
				done = true;
			} else {
				res += p[i].task + " ";
			}
		}
		System.out.println(res);
		res = "";
		for (int i = 0; i < p.length; i++) {
			if (p[i].difficult != use && h[p[i].difficult] == 2) {
				res += p[i + 1].task + " ";
				res += p[i].task + " ";
				i++;
			} else {
				res += p[i].task + " ";
			}
		}
		System.out.println(res);
	}

	class Pair implements Comparable<Pair> {

		int difficult;
		int task;

		public Pair() {
			super();
			this.difficult = 0;
			this.task = 0;
		}

		public Pair(int difficult, int task) {
			super();
			this.difficult = difficult;
			this.task = task;
		}

		@Override
		public int compareTo(Pair arg0) {
			if (this.difficult == arg0.difficult) {
				return this.task - arg0.task;
			}
			return this.difficult - arg0.difficult;
		}

		void show() {
			System.out.println("first = " + this.difficult + " second = "
					+ this.task);
		}
	}

	public static void main(String[] args) {
		new Main3().run();
	}

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	void debug2(char[][] array) {
		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				System.out.print(array[i][j]);
			}
			System.out.println();
		}
	}

	boolean inner(int h, int w, int limH, int limW) {
		return 0 <= h && h < limH && 0 <= w && w < limW;
	}

	void swap(int[] x, int a, int b) {
		int tmp = x[a];
		x[a] = x[b];
		x[b] = tmp;
	}

	// find minimum i (a[i] >= border)
	int lower_bound(int a[], int border) {
		int l = -1;
		int r = a.length;
		while (r - l > 1) {
			int mid = (l + r) / 2;
			if (border <= a[mid]) {
				r = mid;
			} else {
				l = mid;
			}
		}
		// r = l + 1
		return r;
	}

	boolean palindrome(String s) {
		for (int i = 0; i < s.length() / 2; i++) {
			if (s.charAt(i) != s.charAt(s.length() - 1 - i)) {
				return false;
			}
		}
		return true;
	}

	class MyScanner {
		int nextInt() {
			try {
				int c = System.in.read();
				while (c != '-' && (c < '0' || '9' < c))
					c = System.in.read();
				if (c == '-')
					return -nextInt();
				int res = 0;
				do {
					res *= 10;
					res += c - '0';
					c = System.in.read();
				} while ('0' <= c && c <= '9');
				return res;
			} catch (Exception e) {
				return -1;
			}
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		String next() {
			try {
				StringBuilder res = new StringBuilder("");
				int c = System.in.read();
				while (Character.isWhitespace(c))
					c = System.in.read();
				do {
					res.append((char) c);
				} while (!Character.isWhitespace(c = System.in.read()));
				return res.toString();
			} catch (Exception e) {
				return null;
			}
		}

		int[] nextIntArray(int n) {
			int[] in = new int[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextInt();
			}
			return in;
		}

		int[][] nextInt2dArray(int n, int m) {
			int[][] in = new int[n][m];
			for (int i = 0; i < n; i++) {
				in[i] = nextIntArray(m);
			}
			return in;
		}

		double[] nextDoubleArray(int n) {
			double[] in = new double[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextDouble();
			}
			return in;
		}

		long[] nextLongArray(int n) {
			long[] in = new long[n];
			for (int i = 0; i < n; i++) {
				in[i] = nextLong();
			}
			return in;
		}

		char[][] nextCharField(int n, int m) {
			char[][] in = new char[n][m];
			for (int i = 0; i < n; i++) {
				String s = sc.next();
				for (int j = 0; j < m; j++) {
					in[i][j] = s.charAt(j);
				}
			}
			return in;
		}
	}
}