#include <bits/stdc++.h>
struct node {
  int val;
  int in;
};
struct node arr[2000];
int cmp(const void* a, const void* b) {
  return (*(struct node*)a).val - (*(struct node*)b).val;
}
int main() {
  int n, i;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &arr[i].val);
    arr[i].in = i;
  }
  qsort(arr, n, sizeof(struct node), cmp);
  int rep1, rep2, rep3, rep4;
  rep1 = rep2 = rep3 = rep4 = -1;
  for (i = 0; i < n - 1; i++) {
    if (arr[i].val == arr[i + 1].val) {
      if (rep1 == -1)
        rep1 = i, rep2 = i + 1;
      else if (rep3 == -1) {
        rep3 = i;
        rep4 = i + 1;
      }
    }
  }
  if (rep1 == -1 || rep2 == -1 || rep3 == -1)
    printf("NO\n");
  else {
    printf("YES\n");
    for (i = 0; i < n; i++) printf("%d ", arr[i].in + 1);
    printf("\n");
    if (rep2 == rep3) {
      for (i = 0; i < n; i++) {
        if (i == rep2)
          printf("%d ", arr[rep4].in + 1);
        else if (i == rep4)
          printf("%d ", arr[rep2].in + 1);
        else
          printf("%d ", arr[i].in + 1);
      }
      printf("\n");
      for (i = 0; i < n; i++) {
        if (i == rep1)
          printf("%d ", arr[rep2].in + 1);
        else if (i == rep2)
          printf("%d ", arr[rep1].in + 1);
        else
          printf("%d ", arr[i].in + 1);
      }
      printf("\n");
    } else {
      for (i = 0; i < n; i++) {
        if (i == rep2)
          printf("%d ", arr[rep1].in + 1);
        else if (i == rep1)
          printf("%d ", arr[rep2].in + 1);
        else
          printf("%d ", arr[i].in + 1);
      }
      printf("\n");
      for (i = 0; i < n; i++) {
        if (i == rep3)
          printf("%d ", arr[rep4].in + 1);
        else if (i == rep4)
          printf("%d ", arr[rep3].in + 1);
        else
          printf("%d ", arr[i].in + 1);
      }
      printf("\n");
    }
  }
  return 0;
}
