#include <bits/stdc++.h>
using namespace std;
const int maxn = 2005;
int n;
pair<int, int> a[maxn];
void ghikq() {
  for (int i = 1; i <= n; i++) printf("%d ", a[i].second);
  printf("\n");
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i].first);
    a[i].second = i;
  }
  sort(a + 1, a + n + 1);
  vector<pair<int, int> > swapable;
  for (int i = 2; i <= n; i++) {
    if (a[i].first == a[i - 1].first) swapable.push_back(make_pair(i, i - 1));
    if (swapable.size() >= 2) break;
  }
  if (swapable.size() < 2) {
    printf("NO");
  } else {
    printf("YES\n");
    ghikq();
    swap(a[swapable[0].first], a[swapable[0].second]);
    ghikq();
    swap(a[swapable[1].first], a[swapable[1].second]);
    ghikq();
  }
  return 0;
}
