#include <bits/stdc++.h>
using namespace std;
int n, i, k, b[5];
pair<int, int> a[2500];
int main() {
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  sort(a + 1, a + n + 1);
  for (i = 1; i < n; i++) {
    if (k == 2) break;
    if (a[i].first == a[i + 1].first) {
      k++;
      b[k] = i;
    }
  }
  if (k < 2) {
    cout << "NO";
    return 0;
  }
  cout << "YES" << endl;
  for (i = 1; i <= n; i++) cout << a[i].second << " ";
  cout << endl;
  swap(a[b[1]].second, a[b[1] + 1].second);
  for (i = 1; i <= n; i++) cout << a[i].second << " ";
  cout << endl;
  swap(a[b[2]].second, a[b[2] + 1].second);
  for (i = 1; i <= n; i++) cout << a[i].second << " ";
  cout << endl;
}
