#include <bits/stdc++.h>
using namespace std;
#define fo(i,a,b) for(int i=(a);i<(b);i++)
#define MOD 1000000007
#define MP make_pair
#define PB push_back
#define SZ(a) ((int)a.size())
typedef long long ll;

int N;
pair<int, int> a[200200];
pair<int, int> mk[5500500];
pair<int, int> sv;
vector<pair<int, int>> x;

int main () {
  scanf("%d", &N);
  fo(i, 0, N) {
    scanf("%d", &a[i].first);
    a[i].second = i+1;
  }
  sort(a, a+N);
  fo(i, 0, N) {
    int rs = i;
    while (i+1 < N && a[i+1].first == a[i].first) i++;
    int re = i;
    if (re-rs+1 >= 4) {
      puts("YES");
      fo(j, rs, rs+4) printf("%d ", a[j].second);
      return 0;
    }
    if (re-rs+1 >= 2) {
      if (sv.first) {
        puts("YES");
        printf("%d %d ", a[rs].second, sv.first);
        printf("%d %d\n", a[rs+1].second, sv.second);
        return 0;
      } else {
        sv = {a[rs].second, a[rs+1].second};
      }
      mk[2 * a[rs].first] = {a[rs].second, a[rs+1].second};
    }
    x.PB(MP(a[rs].first, a[rs].second));
  }
  fo(i, 0, SZ(x)) fo(j, i+1, SZ(x)) {
    int t = x[i].first + x[j].first;
    if (mk[t].first) {
      puts("YES");
      printf("%d %d ", x[i].second, x[j].second);
      printf("%d %d ", mk[t].first, mk[t].second);
      return 0;
    } else {
      mk[t] = {x[i].second, x[j].second};
    }
  }
  puts("NO");
}
