#include <bits/stdc++.h>
using namespace std;
pair<int, int> p[2003];
int v[2003];
int a[2003];
int main() {
  int n, q = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p[i].first;
    p[i].second = i + 1;
    v[p[i].first]++;
    if (v[p[i].first] > 1) q++;
  }
  sort(p, p + n);
  if (q < 2) {
    cout << "NO";
    return 0;
  }
  cout << "YES" << endl;
  for (int i = 0; i < 3; i++) {
    int f = 1;
    for (int j = 0; j < n; j++) {
      if (i == 0) {
        cout << p[j].second << " ";
        if (j && p[j].first == p[j - 1].first && f) {
          swap(p[j].second, p[j - 1].second);
          a[j] = 1;
          f = 0;
        }
      } else if (i == 1) {
        cout << p[j].second << " ";
        if (j && p[j].first == p[j - 1].first && f && !a[j]) {
          swap(p[j].second, p[j - 1].second);
          f = 0;
        }
      } else {
        cout << p[j].second << " ";
      }
    }
    cout << endl;
  }
  return 0;
}
