#include <bits/stdc++.h>
using namespace std;
const int MAX_L = 1000 * 2 + 10;
pair<int, int> tasks[MAX_L];
int n, temp;
int main() {
  int count = 0, start1 = -1, start2 = -1;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> temp;
    tasks[i].first = temp;
    tasks[i].second = i + 1;
  }
  sort(&tasks[0], &tasks[n]);
  for (int i = 0; i < n - 1; i++) {
    if (tasks[i].first == tasks[i + 1].first) {
      count++;
      if (start1 == -1)
        start1 = i;
      else if ((start1 != -1) && (start2 == -1))
        start2 = i;
    }
  }
  if (count < 2)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) {
      if (i)
        cout << " " << tasks[i].second;
      else
        cout << tasks[i].second;
    }
    cout << endl;
    for (int i = 0; i < n; i++) {
      if (i != start1) {
        if (i)
          cout << " " << tasks[i].second;
        else
          cout << tasks[i].second;
      } else {
        if (i)
          cout << " " << tasks[i + 1].second << " " << tasks[i].second;
        else
          cout << tasks[i + 1].second << " " << tasks[i].second;
        i++;
      }
    }
    cout << endl;
    for (int i = 0; i < n; i++) {
      if (i != start2) {
        if (i)
          cout << " " << tasks[i].second;
        else
          cout << tasks[i].second;
      } else {
        if (i)
          cout << " " << tasks[i + 1].second << " " << tasks[i].second;
        else
          cout << tasks[i + 1].second << " " << tasks[i].second;
        i++;
      }
    }
    cout << endl;
  }
}
