#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, temp;
  cin >> n;
  vector<pair<int, int> > a;
  for (int i = 1; i <= n; ++i) {
    cin >> temp;
    a.push_back(make_pair(temp, i));
  }
  sort(a.begin(), a.end());
  int l = a.size(), flag = 0;
  for (int i = 0; i < l - 1; ++i) {
    if (a[i].first == a[i + 1].first) flag++;
  }
  if (flag < 2)
    cout << "NO";
  else {
    cout << "YES" << endl;
    for (int j = 0; j < l; ++j) cout << a[j].second << " ";
    cout << endl;
    int count = 0;
    for (int i = 0; i < l - 1; ++i) {
      if (a[i].first == a[i + 1].first) {
        swap(a[i], a[i + 1]);
        for (int j = 0; j < l; ++j) cout << a[j].second << " ";
        cout << endl;
        count++;
      }
      if (count >= 2) break;
    }
  }
  return 0;
}
