#include <bits/stdc++.h>
using namespace std;
int rep[2020];
int main() {
  ios::sync_with_stdio(0);
  int n;
  cin >> n;
  pair<int, int> a[n];
  int r = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i].first;
    if (rep[a[i].first]) r++;
    rep[a[i].first]++;
    a[i].second = i + 1;
  }
  if (r < 2) {
    cout << "NO";
    return 0;
  }
  cout << "YES" << endl;
  sort(a, a + n);
  bool b = 1;
  int in = 0;
  for (int i = 0; i < n; i++) {
    cout << a[i].second << " ";
    if (b && i > in && a[i].first == a[i - 1].first) {
      b = 0;
      swap(a[i], a[i - 1]);
      in = i;
    }
  }
  cout << endl;
  b = 1;
  for (int i = 0; i < n; i++) {
    cout << a[i].second << " ";
    if (b && i > in && a[i].first == a[i - 1].first) {
      b = 0;
      swap(a[i], a[i - 1]);
    }
  }
  cout << endl;
  for (int i = 0; i < n; i++) {
    cout << a[i].second << " ";
  }
  cout << endl;
  return 0;
}
