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.awt.Point;
import java.io.*; 
import java.math.*;
import java.util.*;
import java.util.Map.Entry;

import static java.lang.Math.*; 
   
public class solver implements Runnable { 
        final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null; 
        BufferedReader in; 
        PrintWriter out; 
        StringTokenizer tok = new StringTokenizer(""); 
        
        boolean HasTokens(){
            while(!tok.hasMoreTokens()){ 
                try{ 
                        tok = new StringTokenizer(in.readLine()); 
                }catch (Exception e){ 
                        return false; 
                } 
            }
            return true;
        }
          
        String readString() throws IOException{                 
            return HasTokens() ? tok.nextToken():null; 
        } 
        String readString(String delim) throws IOException{ 
            return HasTokens() ? tok.nextToken(delim):null;
        } 
         
        int readInt() throws IOException{ 
            return Integer.parseInt(readString()); 
        }   
        long readLong() throws IOException{ 
            return Long.parseLong(readString()); 
        }       
        double readDouble() throws IOException{ 
            return Double.parseDouble(readString()); 
        }  
        char readChar() throws IOException { 
            char val = 0; 
            do{ 
                val = (char) in.read(); 
            }while(val == '\n' || val == '\r'); 
            return val; 
        } 
        char readChar(String skipChars)throws IOException{ 
            char val = 0; 
            boolean ret; 
            do{ 
                val = (char) in.read(); 
                ret = false; 
                for (int i = skipChars.length()-1; i >= 0; i--){ 
                    if (skipChars.charAt(i) == val){ 
                        ret = true; 
                        break; 
                    } 
                } 
            }while(ret); 
            return val; 
        }
//----------------------------------
        int gcd(int x, int y){
            while (y != 0) {
                int temp = x%y; x = y; y = temp;
            }
            return x;
        }
//----------------------------------        
          
//        public class Pair<T1,T2> { 
//            public T1 x1; 
//            public T2 x2; 
//            public Pair(){}; 
//            public Pair(T1 x1, T2 x2){ 
//                this.x1 = x1; 
//                this.x2 = x2; 
//            } 
//            public String toString(){ 
//                return x1 + ":" + x2; 
//            } 
//        }  
        
        public class Three implements Comparable<Three>{ 
            public int x1, x2, x3; 
            public Three(){} 
            public Three(int a, int b, int c){x1 = a;x2=b;x3=c;} 
            public int compareTo(Three o) {//               
                if(x1 == o.x1 && x2 == o.x2) return x3-o.x3;
                if(x1 == o.x1) return x2-o.x2;
                return (x1-o.x1);  
                // (x1-o.x1) - increase; -(x1-o.x1) - decrease 
            } 
            public String toString(){ 
                return x1 + ":" + x2 + ":" + x3; 
            } 
        } 
//----------------------------------------  
           
        long f(long s){
            
            long res = 1;
            while (s > 0){
                res *=s--;
            }
            return res;
        }
        void solve() throws NumberFormatException, IOException {
            int n = readInt();

            Point[] p = new Point[n];
                
            long ans = 1;
            
            for (int i = 0; i <n; i++){
                p[i] = new Point(readInt(), i+1);
            }
            
            
            Arrays.sort(p, new Comparator<Point>() {

                @Override
                public int compare(Point o1, Point o2) {
                    return o1.x - o2.x;
                }
            });         
            
            TreeMap<Integer, Integer> map = new TreeMap<Integer, Integer>();
            
            int lasti = p[0].x;
            int s = 0;
            for (int i = 0; i < n; i++){
                if (p[i].x != lasti){
                    
                    if (ans < 3){
                        if (s == 2){
                            ans *= 2;
                        }
                        if (s > 2){
                            ans = 100;
                        }
                    }
                    
                    map.put(lasti, s);
                    
                    s = 0;
                    lasti = p[i].x;
                }
                s++;
            }
            
            if (ans < 3){
                if (s == 2){
                    ans *= 2;
                }
                if (s > 2){
                    ans = 100;
                }
            }
            
            map.put(lasti, s);
            
            
            
            if (ans > 3){
                out.println("YES");
            }else{
                out.println("NO");
                return;
            }
            
            int tr = 0;
            int ii = 0;
            for (Integer e : map.keySet()) {
                Integer v = map.get(e);
                for (int i = 0; i < v; i++){
                    out.print(p[ii++].y + " ");
                }
            }
            out.println();
            
            tr = 0;
            ii = 0;
            
            for (Integer e : map.keySet()) {
                Integer v = map.get(e);
                
                if (tr < 3){
                    if (v == 2)
                    {
                        out.print(p[ii+1].y + " ");
                        out.print(p[ii].y + " ");
                        ii+=2;
                        tr+=2;
                        continue;
                    }
                    if (v >= 3)
                    {
                        out.print(p[ii++].y + " ");
                        out.print(p[ii+1].y + " ");
                        out.print(p[ii].y + " ");
                        ii+=2;
                        tr+=3;
                        
                        for (int i = 0; i < v-3; i++){
                            out.print(p[ii++].y + " ");
                        }
                        
                        continue;
                    }
                    for (int i = 0; i < v; i++){
                        out.print(p[ii++].y + " ");
                    }
                    
                }else               
                for (int i = 0; i < v; i++){
                    out.print(p[ii++].y + " ");
                }
            }
            
            out.println();
            
            tr = 0;
            ii = 0;
            boolean was = false;
            
            for (Integer e : map.keySet()) {
                Integer v = map.get(e);
                
                if (tr < 3){
                    if (v == 2 && !was)
                    {
                        was = true;
                        out.print(p[ii+1].y + " ");
                        out.print(p[ii].y + " ");
                        ii+=2;
                        tr+=2;
                        continue;
                    }
                    if (v >= 3)
                    {
                        out.print(p[ii+1].y + " ");
                        out.print(p[ii].y + " ");
                        out.print(p[ii+2].y + " ");
                        ii+=3;
                        tr+=3;
                        
                        for (int i = 0; i < v-3; i++){
                            out.print(p[ii++].y + " ");
                        }
                        
                        
                        continue;
                    }
                    for (int i = 0; i < v; i++){
                        out.print(p[ii++].y + " ");
                    }
                    
                }else               
                for (int i = 0; i < v; i++){
                    out.print(p[ii++].y + " ");
                }
            }
            
            
            
        }
        
//---------------------------------------- 
        public static void main(String[] args){ 
                new Thread(null, new solver(), "", 256 * (1L << 20)).start(); 
        } 
         
        public void run(){ 
                try{ 
                        timeBegin = System.currentTimeMillis(); 
                        try{ 
                            if (ONLINE_JUDGE){ 
                                in = new BufferedReader(new InputStreamReader(System.in)); 
                                out = new PrintWriter(System.out); 
                            }  
                            else { 
                                in = new BufferedReader(new FileReader("input.txt")); 
                                out = new PrintWriter("output.txt"); 
                            } 
                        }catch(Throwable e){
                            in = new BufferedReader(new InputStreamReader(System.in)); 
                            out = new PrintWriter(System.out); 
                        }
                          
                        solve(); 
                        out.close(); 
                          
                        timeEnd = System.currentTimeMillis(); 
                        System.err.println("Time = " + (timeEnd - timeBegin)); 
                }catch (Exception e){ 
                        e.printStackTrace(System.err); 
                        System.exit(-1); 
                } 
        } 
         
        long timeBegin, timeEnd; 
   
          
//----------        
        void update(int[] doo, int v, int i, int val, int ll, int rr){ 
            if (ll == rr){ 
                doo[v] = val; 
            }else{ 
                int med = ll + ((rr-ll)>>1); 
                  
                if (i <= med){ 
                    update(doo, v<<1, i, val, ll, med); 
                }else{ 
                    update(doo, (v<<1)+1, i, val, med+1, rr); 
                } 
                doo[v] = min(doo[v<<1], doo[(v<<1)+1]); 
            } 
        } 
        long get(long[] doo, int v, int l, int r, int ll, int rr){ 
            if (l > r){ 
                return Integer.MAX_VALUE; 
            } 
            if (ll == l && r == rr){ 
                return doo[v]; 
            } 
            int med = ll + ((rr-ll)>>1);
            return min(get(doo, v<<1, l, min(r, med), ll, med),  
                    get(doo, (v<<1)+1, max(l, med+1), r, med+1, rr)); 
        }        
        
 //----------------------------------------

        int BinSearch(int[] a, int x, boolean increase){

            int first = 0;
            int last = a.length;
            
            if (increase){
                while (first <= last) {
                    int mid = first + ((last - first) >> 1);                
                    if (x <= a[mid])
                        last = mid;
                    else
                        first = mid + 1;
                }
                return last;
            }else{
                while (first <= last) {
                    int mid = first + ((last - first) >> 1);                
                    if (x > a[mid])
                        last = mid;
                    else
                        first = mid + 1;
                }
                return first;
            }
        }
        
        
//-----------------------------------------
}