#include <bits/stdc++.h>
using namespace std;
const int maxn = 2010;
struct node {
  int id;
  int h;
} task[maxn];
int cmp(node &a, node &b) { return a.h < b.h; }
int cnt[maxn];
int n;
int main() {
  while (scanf("%d", &n) != EOF) {
    int tmp, c = 0;
    int flag = 0;
    memset(cnt, 0, sizeof(cnt));
    for (int i = 1; i <= n; i++) {
      scanf("%d", &tmp);
      task[i].h = tmp;
      task[i].id = i;
      if (cnt[tmp]) c++;
      cnt[tmp]++;
    }
    if (c < 2)
      printf("NO\n");
    else {
      printf("YES\n");
      sort(task + 1, task + 1 + n, cmp);
      int time;
      for (time = 0; time < 3; time++) {
        int i, j;
        for (i = 1; i <= n; i++) printf("%d ", task[i].id);
        printf("\n");
        for (j = 1; j < n; j++) {
          if (task[j].h == task[j + 1].h && task[j].id < task[j + 1].id) {
            swap(task[j], task[j + 1]);
            break;
          }
        }
      }
    }
  }
}
