#include <bits/stdc++.h>
using namespace std;
struct CASE {
  int hard;
  int place;
};
bool operator<(const CASE &c1, const CASE &c2) { return c1.hard < c2.hard; }
int main() {
  int n;
  CASE list[2048];
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> list[i].hard;
    list[i].place = i;
  }
  sort(list + 1, list + n + 1);
  int pair = 0;
  for (int i = 1; i < n; i++) {
    if (list[i].hard == list[i + 1].hard) pair++;
    if (pair == 2) break;
  }
  if (pair == 2) {
    puts("YES");
    for (int i = 1; i <= n; i++) printf("%d ", list[i].place);
    putchar('\n');
    for (int i = 1, time = 0; i < n && time < 2; i++) {
      if (list[i].hard == list[i + 1].hard) {
        CASE c = list[i];
        list[i] = list[i + 1];
        list[i + 1] = c;
        time++;
        for (int i = 1; i <= n; i++) printf("%d ", list[i].place);
        putchar('\n');
      }
    }
  } else
    puts("NO");
  return 0;
}
