#include <bits/stdc++.h>
using namespace std;
int n, x;
set<int> s;
pair<int, int> p[2100];
void print() {
  for (int i = 0; i < n; i++) cout << p[i].second << " ";
  cout << endl;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    s.insert(x);
    p[i].first = x, p[i].second = i + 1;
  }
  if (n - s.size() >= 2) {
    sort(p, p + n);
    cout << "YES" << endl;
    print();
    int idx = 0;
    for (int i = 0; i < 2; i++)
      for (int j = idx + 1; j < n; j++)
        if (p[j].first == p[j - 1].first) {
          swap(p[j], p[j - 1]);
          idx = j;
          print();
          break;
        }
  } else
    cout << "NO" << endl;
  return 0;
}
