#include <bits/stdc++.h>
using namespace std;
pair<int, int> p[2005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int a;
    cin >> a;
    p[i] = make_pair(a, i);
  }
  sort(p + 1, p + n + 1);
  int cur = 0;
  for (int i = 1; i < n; i++) {
    if (p[i].first == p[i + 1].first) cur++;
  }
  if (cur <= 1)
    return cout << "NO", 0;
  else
    cout << "YES\n", 0;
  for (int i = 1; i <= n; i++) {
    cout << p[i].second << " ";
  }
  cout << endl;
  int a = 0, b = 0;
  for (int i = 1; i < n; i++) {
    if (p[i].first == p[i + 1].first) {
      b = i;
      swap(p[i], p[i + 1]);
      break;
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << p[i].second << " ";
  }
  cout << endl;
  swap(p[b], p[b + 1]);
  for (int i = 1; i < n; i++) {
    if (p[i].first == p[i + 1].first && i != b) {
      swap(p[i], p[i + 1]);
      break;
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << p[i].second << " ";
  }
}
