#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
void swapi(int arr[], int ind1, int ind2) {
  int temp = arr[ind2];
  arr[ind2] = arr[ind1];
  arr[ind1] = temp;
}
int main() {
  pair<int, int> a[2005];
  int n, num, arr[2005], index1, index2;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &num);
    a[i] = make_pair(num, i + 1);
  }
  sort(a, a + n);
  int i = 0, cnt = 0;
  for (int i = 0; i < n - 1; i++) {
    if (a[i].first == a[i + 1].first) {
      cnt++;
      index1 = i;
      break;
    }
  }
  for (int i = 0; i < n - 1; i++) {
    if ((a[i].first == a[i + 1].first) && i != index1) {
      cnt++;
      index2 = i;
      break;
    }
  }
  if (cnt != 2)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) arr[i] = a[i].second;
    for (int i = 0; i < n; i++) cout << arr[i] << " ";
    cout << endl;
    swap(arr[index1], arr[index1 + 1]);
    for (int i = 0; i < n; i++) cout << arr[i] << " ";
    cout << endl;
    swap(arr[index2], arr[index2 + 1]);
    for (int i = 0; i < n; i++) cout << arr[i] << " ";
    cout << endl;
  }
  return 0;
}
