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.*;

import java.io.*;
import java.math.*;
 public class Q1 {

	static ArrayList<Integer> adj[],adj2[];
	static int color[],cc;
	static long mod=1000000007;
	static TreeSet<Integer> ts;
	static boolean b[],visited[],possible,ans1,ans2;
	static Stack<Integer> s;
	static int totalnodes,colored,minc;
	static int c[],a[],n,parent[],ans[],size[];
	static long sum[];
	static HashMap<Integer,Integer> hm;
	public static void main(String[] args) throws IOException {
		
		//Scanner sc=new Scanner(System.in);
		in=new InputReader(System.in);
		out=new PrintWriter(System.out);
		int n=in.nextInt();
		int a[]=new int[n];
		c=new int[2001];
		Pair p[]=new Pair[n];
		for(int i=0;i<n;i++)
		{
			a[i]=in.nextInt();
			c[a[i]]++;
			p[i]=new Pair(i+1,a[i]);
		}
		int cnt=0,cnt2=0;
	//	debug(c[5]);
		for(int i=0;i<=2000;i++)
		{
			if(c[i]>2)
				cnt++;
			else if(c[i]==2)
				cnt2++;
				
		}
	//	debug(c);
		int three[][]=new int[3][n];
		if(cnt>=1 ||  cnt2>=2)
		{
			out.println("YES");
			Arrays.sort(p);
			
			int pos=0;boolean flag=false;boolean msflag=false;
			for(int i=0;i<n;i++)
			{
				
				
				 if(c[p[i].j]==2 && cnt==0 && msflag==false)
				{
					if(flag==false)
					{
						three[0][i]=p[i].i;
						three[0][i+1]=p[i+1].i;
						three[1][i]=p[i+1].i;
						three[1][i+1]=p[i].i;
						three[2][i]=p[i].i;
						three[2][i+1]=p[i+1].i;
						flag=true;
						i++;
					}
					else
					{
						three[0][i]=p[i].i;
						three[0][i+1]=p[i+1].i;
						three[1][i]=p[i].i;
						three[1][i+1]=p[i+1].i;
						three[2][i]=p[i+1].i;
						three[2][i+1]=p[i].i;
						i++;
						msflag=true;
					}
				}
				else if(msflag==false && c[p[i].j]>2)
				{
					three[0][i]=p[i].i;
					three[0][i+1]=p[i+1].i;
					three[0][i+2]=p[i+2].i;
					three[1][i]=p[i].i;
					three[1][i+1]=p[i+2].i;
					three[1][i+2]=p[i+1].i;
					three[2][i]=p[i+1].i;
					three[2][i+1]=p[i].i;
					three[2][i+2]=p[i+2].i;
					i=i+2;msflag=true;
				}
				else
				{
					three[0][i]=p[i].i;
					three[1][i]=p[i].i;
					three[2][i]=p[i].i;
				
				}
			}
			for(int i=0;i<3;i++)
			{
				for(int j=0;j<n-1;j++)
				{
					out.print(three[i][j]+" ");
				}
				out.print(three[i][n-1]);
				out.println();
			}
		}
		else
			out.println("NO");
		
		
		out.close();
		}
	static int check(int m)
	{
		int c=0;
		for(int i=0;i<n-1;i++)
		{
			int l=i;
			int r=n-1;
			while(l<r)
			{
				int mid=(l+r)/2;
				
				if(a[i]+m+1>a[mid])
					l=mid+1;
				else
					r=mid;
			}
		//debug(" l****** "+l);
			if(!(a[l]-a[i]<=m))
			while(a[l]==a[l-1])
				l--;
			
		//	debug((l-1-(i)));
			if(l==n-1 && !(a[l]-a[i]>m) )
				c=c+l-i;
			else
			c=c+(l-1-(i));
		}
		
		return c;
	}
	static InputReader in;
	static PrintWriter out;
 	static void dfs(int i)
	{
 		 size[i]=1;int badabeta=0;
 		 for(int j=0;j<adj[i].size();j++)
 		 {
 			 int son=adj[i].get(j);
 			 dfs(son);
 			 size[i]+=size[son];
 			 
 			 if(size[son]>size[badabeta])
 				 badabeta=son;
 		 }
 		 if(size[badabeta]*2>size[i])
 		 {
 			 int dada = ans[badabeta];
 			 while((size[i]-size[dada])*2>size[i])
 				 dada=parent[dada];
 			 ans[i]=dada;
 		 }
		
	}
	/*public static void seive(long n){
		b = new boolean[(int) (n+1)];
	Arrays.fill(b, true);
	
		for(int i = 2;i*i<=n;i++){
			if(b[i]){
				sum[i]=count[i];
			//	System.out.println(sum[i]+" wf");
				for(int p = 2*i;p<=n;p+=i){
					b[p] = false;
					sum[i]+=count[p];  
					//System.out.println(sum[i]);
				}
			}
		
		}
	}*/
	static class Pair implements Comparable<Pair> {
		int i;
		int j;
		//int index;
		public Pair(){
			
		}
		public Pair(int u, int v) {
			this.i = u;
			this.j= v;
			
		}
		public int compareTo(Pair other) {
			
			
				return this.j-other.j;
		}
		
		/*public String toString() {
			return "[u=" + u + ", v=" + v + "]";
		}*/
	}
	static class Node2{
		Node2 left = null;
		Node2 right = null;
		Node2 parent = null;
		int data;
	}
	
	//binaryStree
	static class BinarySearchTree{
		Node2 root = null;
		int height = 0;
		int max = 0;
		int cnt = 1;
		ArrayList<Integer> parent = new ArrayList<>();
		HashMap<Integer, Integer> hm = new HashMap<>();
		public void insert(int x){
			Node2 n = new Node2();
			n.data = x;
			if(root==null){
				root = n;
			}
			else{
				Node2 temp = root,temp2 = null;
				while(temp!=null){
					temp2 = temp;
					if(x>temp.data) temp = temp.right;
					else temp = temp.left;
				}
				if(x>temp2.data) temp2.right = n;
				else temp2.left = n;
				n.parent = temp2;
				parent.add(temp2.data);
			}
		}
		public Node2 getSomething(int x, int y, Node2 n){
			if(n.data==x || n.data==y) return n;
			else if(n.data>x && n.data<y) return n;
			else if(n.data<x && n.data<y) return getSomething(x,y,n.right);
			else return getSomething(x,y,n.left);
		}
		public Node2 search(int x,Node2 n){
			if(x==n.data){
				max = Math.max(max, n.data);
				return n;
			}
			if(x>n.data){
				max = Math.max(max, n.data);
				return search(x,n.right);
			}
			else{
				max = Math.max(max, n.data);
				return search(x,n.left);
			}
		}
		public int getHeight(Node2 n){
			if(n==null) return 0;
			height = 1+ Math.max(getHeight(n.left), getHeight(n.right));
			return height;
		}
	}
public static void debug(Object... o) {
	System.out.println(Arrays.deepToString(o));
}

public static String rev(String s)
{
	StringBuilder sb=new StringBuilder(s);
	sb.reverse();
	return sb.toString();
}

static long lcm(long a, long b)
{
    return a * (b / gcd(a, b));
}

static long gcd(long a, long b)
{
    while (b > 0)
    {
        long temp = b;
        b = a % b; // % is remainder
        a = temp;
    }
    return a;
}

public static long max(long x, long y, long z){
		if(x>=y && x>=z) return x;
		if(y>=x && y>=z) return y;
		return z;
	}
	static int[] sieve(int n,int[] arr)
	{
	for(int i=2;i*i<=n;i++)
	{
		if(arr[i]==0)
		{
			for(int j=i*2;j<=n;j+=i)
				arr[j]=1;
		}
	}
	return arr;
	}




static class InputReader {

private final InputStream stream;
private final byte[] buf = new byte[8192];
private int curChar, snumChars;
private SpaceCharFilter filter;

public InputReader(InputStream stream) {
  this.stream = stream;
}

public int snext() {
  if (snumChars == -1)
    throw new InputMismatchException();
  if (curChar >= snumChars) {
    curChar = 0;
    try {
      snumChars = stream.read(buf);
    } catch (IOException e) {
      throw new InputMismatchException();
    }
    if (snumChars <= 0)
      return -1;
  }
  return buf[curChar++];
}

public int nextInt() {
  int c = snext();
  while (isSpaceChar(c)) {
    c = snext();
  }
  int sgn = 1;
  if (c == '-') {
    sgn = -1;
    c = snext();
  }
  int res = 0;
  do {
    if (c < '0' || c > '9')
      throw new InputMismatchException();
    res *= 10;
    res += c - '0';
    c = snext();
  } while (!isSpaceChar(c));
  return res * sgn;
}

public long nextLong() {
  int c = snext();
  while (isSpaceChar(c)) {
    c = snext();
  }
  int sgn = 1;
  if (c == '-') {
    sgn = -1;
    c = snext();
  }
  long res = 0;
  do {
    if (c < '0' || c > '9')
      throw new InputMismatchException();
    res *= 10;
    res += c - '0';
    c = snext();
  } while (!isSpaceChar(c));
  return res * sgn;
}

public int[] nextIntArray(int n) {
	 return nextIntArray(n, 0);
	    }
	    
public int[] nextIntArray(int n, int off) {
	 int[] arr = new int[n + off];
	   for (int i = 0; i < n; i++) {
	    arr[i + off] = nextInt();
	    }
	    return arr;
	    }
	    
public long[] nextLongArray(int n) {
return nextLongArray(n, 0);
	    }
        
	public long[] nextLongArray(int n, int off) {
	 long[] arr = new long[n + off];
	 for (int i = 0; i < n; i++) {
		  arr[i + off] = nextLong();
		 }
 return arr;
	}


public String readString() {
  int c = snext();
  while (isSpaceChar(c)) {
    c = snext();
  }
  StringBuilder res = new StringBuilder();
  do {
    res.appendCodePoint(c);
    c = snext();
  } while (!isSpaceChar(c));
  return res.toString();
}

public String nextLine() {
  int c = snext();
  while (isSpaceChar(c))
    c = snext();
  StringBuilder res = new StringBuilder();
  do {
    res.appendCodePoint(c);
    c = snext();
  } while (!isEndOfLine(c));
  return res.toString();
}

public boolean isSpaceChar(int c) {
  if (filter != null)
    return filter.isSpaceChar(c);
  return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}

private boolean isEndOfLine(int c) {
  return c == '\n' || c == '\r' || c == -1;
}

public interface SpaceCharFilter {
  public boolean isSpaceChar(int ch);
}
}
	
}