#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    int cnt = 0;
    pair<int, int> num[2100];
    for (int i = 0; i < n; i++) cin >> num[i].first, num[i].second = i + 1;
    sort(num, num + n);
    for (int i = 0; i < n - 1; i++) {
      if (num[i].first == num[i + 1].first) cnt++;
    }
    if (cnt < 2)
      cout << "NO" << endl;
    else {
      cout << "YES" << endl;
      int ans = 0;
      for (int i = 0; i < n; i++) cout << num[i].second << " ";
      cout << endl;
      for (int i = 0; i < n, ans < 2; i++) {
        if (num[i].first == num[i + 1].first) {
          swap(num[i].second, num[i + 1].second);
          for (int j = 0; j < n; j++) cout << num[j].second << " ";
          cout << endl;
          ans++;
        }
      }
    }
  }
  return 0;
}
