#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define MEM(x,val) memset(x,val,sizeof(x))
#define LL long long
#define F first
#define S second
#define PI pair<int,int>
#define PLL pair<LL,LL>
#define ALL(x) x.begin(),x.end()
#define FAST ios_base::sync_with_stdio(false);cin.tie(0);

const int N = 10000005;
vector<PI>pa[N];

void solve(){
  int n; cin >> n;
  vector<PI>v;
  for(int i = 1; i<=n; i++){
    int x; cin >> x;
    v.pb({x,i});
  }
  sort(ALL(v));
  for(int i = 1; i<n; i++){
    int sum = 0;
    for(int j = i-1; j>=0; j--){
      sum = v[i].F - v[j].F;
      if(pa[sum].size() > 0){
        for(auto it : pa[sum]){
          if(it.F != v[i].S && it.F != v[j].S && it.S != v[i].S && it.S != v[j].S){
            cout << "YES" << endl;
            cout << it.F << ' ' << v[j].S << " " << it.S << " " << v[i].S << endl;
            return;
          }
        }
      }
      pa[sum].pb({v[i].S,v[j].S});
    }
  }
  cout << "NO" << endl;
}



int32_t main(){
  #ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  #endif

  int tt; tt = 1;
  int cas = 1;
  while(tt--){
    //printf("Case %d:",cas++);
    solve();
  }
}
