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.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.*;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.math.BigInteger;

/**
 * Ashesh Vidyut (Drift King) *
 */
public class B {
    public static void main(String[] args) {
        try {
            InputReader in = new InputReader(System.in);
            BufferedWriter out = new BufferedWriter(new OutputStreamWriter(System.out));
            int n = in.readInt();
            Vector<Integer> ind[] = new Vector[2001];
            for (int i = 0; i < 2001; i++) {
                ind[i] = new Vector<Integer>();
            }
            for (int i = 0; i < n; i++) {
                int td = in.readInt();
                ind[td].add(i + 1);
            }
            boolean ans = false;
            boolean morethree = false;
            int ft = -1, st = -1;
            int counttwo = 0;
            int indmthree = -1;
            for (int i = 0; i < 2001; i++) {
                if(ind[i].size() >= 3){
                    ans = true;
                    morethree = true;
                    indmthree = i;
                }
                if(ind[i].size() == 2){
                    counttwo++;
                    if(ft == -1){
                        ft = i;
                    }
                    else{
                        st = i;
                    }
                }
            }
            if(counttwo >= 2){
                ans = true;
            }
            if(ans){
                out.write("YES");
                out.newLine();
                for (int i = 0; i < 2001; i++) {
                    if(ind[i].size() > 0){
                        for (Integer index : ind[i]) {
                            out.write(Integer.toString(index)+" ");
                        }
                    }
                }
                out.newLine();
                if(morethree){
                    for (int i = 0; i < 2001; i++) {
                        if(i == indmthree){
                            int fi = ind[i].get(0);
                            int si = ind[i].get(1);
                            out.write(Integer.toString(si)+" ");
                            out.write(Integer.toString(fi)+" ");
                            for (int j = 2; j < ind[i].size(); j++) {
                                out.write(Integer.toString(ind[i].get(j))+" ");
                            }
                        }
                        else if(ind[i].size() > 0){
                            for (Integer index : ind[i]) {
                                out.write(Integer.toString(index)+" ");
                            }
                        }
                    }
                    out.newLine();
                    for (int i = 0; i < 2001; i++) {
                        if(i == indmthree){
                            int fi = ind[i].get(0);
                            int si = ind[i].get(1);
                            int ti = ind[i].get(2);
                            out.write(Integer.toString(ti)+" ");
                            out.write(Integer.toString(fi)+" ");
                            out.write(Integer.toString(si)+" ");
                            for (int j = 3; j < ind[i].size(); j++) {
                                out.write(Integer.toString(ind[i].get(j))+" ");
                            }
                        }
                        else if(ind[i].size() > 0){
                            for (Integer index : ind[i]) {
                                out.write(Integer.toString(index)+" ");
                            }
                        }
                    }
                    out.newLine();
                }
                else{
                    for (int i = 0; i < 2001; i++) {
                        if(i == ft){
                            int fi = ind[i].get(0);
                            int si = ind[i].get(1);
                            out.write(Integer.toString(si)+" ");
                            out.write(Integer.toString(fi)+" ");
                        }
                        else if(ind[i].size() > 0){
                            for (Integer index : ind[i]) {
                                out.write(Integer.toString(index)+" ");
                            }
                        }
                    }
                    out.newLine();
                    for (int i = 0; i < 2001; i++) {
                        if(i == st){
                            int fi = ind[i].get(0);
                            int si = ind[i].get(1);
                            out.write(Integer.toString(si)+" ");
                            out.write(Integer.toString(fi)+" ");
                        }
                        else if(ind[i].size() > 0){
                            for (Integer index : ind[i]) {
                                out.write(Integer.toString(index)+" ");
                            }
                        }
                    }
                    out.newLine();
                }
            }
            else{
                out.write("NO");
            }
            out.newLine();
            out.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
class InputReader {
    private boolean finished = false;

    private InputStream stream;
    private byte[] buf = new byte[1024];
    private int curChar;
    private int numChars;

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

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

    public int peek() {
        if (numChars == -1)
            return -1;
        if (curChar >= numChars) {
            curChar = 0;
            try {
                numChars = stream.read(buf);
            } catch (IOException e) {
                return -1;
            }
            if (numChars <= 0)
                return -1;
        }
        return buf[curChar];
    }

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

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

    public String readString() {
        int length = readInt();
        if (length < 0)
            return null;
        byte[] bytes = new byte[length];
        for (int i = 0; i < length; i++)
            bytes[i] = (byte) read();
        try {
            return new String(bytes, "UTF-8");
        } catch (UnsupportedEncodingException e) {
            return new String(bytes);
        }
    }

    public static boolean isSpaceChar(int c) {
        return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    }

    private String readLine0() {
        StringBuffer buf = new StringBuffer();
        int c = read();
        while (c != '\n' && c != -1) {
            if (c != '\r')
                buf.appendCodePoint(c);
            c = read();
        }
        return buf.toString();
    }

    public String readLine() {
        String s = readLine0();
        while (s.trim().length() == 0)
            s = readLine0();
        return s;
    }

    public String readLine(boolean ignoreEmptyLines) {
        if (ignoreEmptyLines)
            return readLine();
        else
            return readLine0();
    }

    public BigInteger readBigInteger() {
        try {
            return new BigInteger(readString());
        } catch (NumberFormatException e) {
            throw new InputMismatchException();
        }
    }

    public char readCharacter() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        return (char) c;
    }

    public double readDouble() {
        int c = read();
        while (isSpaceChar(c))
            c = read();
        int sgn = 1;
        if (c == '-') {
            sgn = -1;
            c = read();
        }
        double res = 0;
        while (!isSpaceChar(c) && c != '.') {
            if (c == 'e' || c == 'E')
                return res * Math.pow(10, readInt());
            if (c < '0' || c > '9')
                throw new InputMismatchException();
            res *= 10;
            res += c - '0';
            c = read();
        }
        if (c == '.') {
            c = read();
            double m = 1;
            while (!isSpaceChar(c)) {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, readInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                m /= 10;
                res += (c - '0') * m;
                c = read();
            }
        }
        return res * sgn;
    }

    public boolean isExhausted() {
        int value;
        while (isSpaceChar(value = peek()) && value != -1)
            read();
        return value == -1;
    }

    public String next() {
        return readString();
    }

    public boolean readBoolean() {
        return readInt() == 1;
    }
}