#include <bits/stdc++.h>
using namespace std;
const int maxn = 2000 + 10;
int n;
pair<int, int> a[maxn];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i].first;
    a[i].second = i + 1;
  }
  sort(a, a + n);
  int tot = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i].first == a[i + 1].first) tot++;
  }
  if (tot < 2)
    cout << "NO";
  else {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) cout << a[i].second << " ";
    cout << endl;
    int last = 0;
    for (int i = 0; i < n; i++) {
      if (a[i].first == a[i + 1].first) {
        swap(a[i], a[i + 1]);
        last = i + 1;
        break;
      }
    }
    for (int i = 0; i < n; i++) cout << a[i].second << " ";
    cout << endl;
    for (int i = last; i < n; i++) {
      if (a[i].first == a[i + 1].first) {
        swap(a[i], a[i + 1]);
        last = i + 1;
        break;
      }
    }
    for (int i = 0; i < n; i++) cout << a[i].second << " ";
    cout << endl;
  }
  return 0;
}
