#include <bits/stdc++.h>
using namespace std;
int n;
pair<int, int> p[2001];
vector<int> v;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p[i].first;
    p[i].second = i + 1;
  }
  sort(p, p + n);
  for (int i = 0; i < n - 1; i++)
    if (p[i].first == p[i + 1].first) v.push_back(i);
  if (v.size() * 2 < 3) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  for (int k = 0; k < n; k++) {
    cout << p[k].second << " ";
  }
  cout << endl;
  for (int i = 0; i < 2; i++) {
    swap(p[v[i]], p[v[i] + 1]);
    for (int k = 0; k < n; k++) {
      cout << p[k].second << " ";
    }
    cout << endl;
    swap(p[v[i]], p[v[i] + 1]);
  }
  return 0;
}
