#include <bits/stdc++.h>
using namespace std;
int n;
struct node {
  int nd;
  int id;
} a[2005];
bool cmp(node a, node b) { return a.nd < b.nd; }
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i].nd;
    a[i].id = i;
  }
  sort(a, a + n, cmp);
  int cnt = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i].nd == a[i + 1].nd) {
      cnt++;
    }
  }
  if (cnt < 2) {
    puts("NO");
  } else {
    puts("YES");
    for (int i = 0; i < n; i++) {
      cout << a[i].id + 1 << " ";
    }
    cout << endl;
    int flag;
    for (int i = 0, flag = 0; i < n, flag < 2; i++) {
      if (a[i].nd == a[i + 1].nd) {
        swap(a[i], a[i + 1]);
        for (int j = 0; j < n; j++) {
          cout << a[j].id + 1 << " ";
        }
        cout << endl;
        flag++;
      }
    }
  }
  return 0;
}
