#include <bits/stdc++.h>
using namespace std;
struct stu {
  int num;
  int no;
} h[3010];
bool cmp(stu a, stu b) {
  if (a.num != b.num)
    return a.num < b.num;
  else
    return a.no < b.no;
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> h[i].num;
    h[i].no = i + 1;
  }
  sort(h, h + n, cmp);
  int p = 0, q = 0;
  int first = 1;
  for (int i = 1; i < n; i++) {
    if (h[i].num == h[i - 1].num) {
      if (first) {
        first = 0;
        p = i;
      } else {
        q = i;
        break;
      }
    }
  }
  if (p && q) {
    cout << "YES\n";
    for (int i = 0; i < n; i++) {
      cout << h[i].no << " ";
    }
    cout << endl;
    swap(h[p].no, h[p - 1].no);
    for (int i = 0; i < n; i++) {
      cout << h[i].no << " ";
    }
    cout << endl;
    swap(h[q].no, h[q - 1].no);
    for (int i = 0; i < n; i++) {
      cout << h[i].no << " ";
    }
    cout << endl;
  } else {
    cout << "NO\n";
  }
  return 0;
}
