#include <bits/stdc++.h>
using namespace std;
vector<vector<int>> v;
vector<pair<int, int>> kol;
vector<pair<int, int>> V;
bool fun(pair<int, int> i, pair<int, int> j) { return i.first < j.first; }
int main() {
  int n;
  cin >> n;
  V.resize(n);
  int sov = 0;
  for (int i = 0; i < n; i++) {
    cin >> V[i].first;
    V[i].second = i + 1;
    for (int j = 0; j < i; j++) {
      if (V[i].first == V[j].first) sov++;
    }
  }
  int t = -1;
  int per = -1;
  sort(V.begin(), V.end(), fun);
  if (sov < 2) {
    cout << "NO";
  } else {
    cout << "YES";
    for (int k = 0; k < 3; k++) {
      cout << "\n";
      per++;
      int tek = 0;
      t++;
      if (t == 0) {
        for (int i = 0; i < n; i++) {
          cout << V[i].second << " ";
        }
      } else {
        for (int i = 1; i <= n; i++) {
          if (i != n && V[i - 1].first == V[i].first) {
            tek++;
            if (tek == per) {
              cout << V[i].second << " " << V[i - 1].second << " ";
              i++;
            } else {
              cout << V[i - 1].second << " ";
            }
            continue;
          }
          cout << V[i - 1].second << " ";
        }
      }
    }
  }
}
