#include <bits/stdc++.h>
typedef long long ll ;
using namespace std;
const int maxn=2e5+5;
const int maxm=5e6+5;
#define P pair<int,int>
#define fi first
#define se second
int t,n;
int a[maxn];
int vis[maxm*2];
P mp[maxm];


int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr), cout.tie(nullptr);
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>a[i];
    }
    int sum1;
    for(int i=1;i<=n;i++){
        for(int j=i+1;j<=n;j++){
            sum1=a[i]+a[j];
            if(mp[sum1].fi==0 &&mp[sum1].se==0){
                mp[sum1]={i,j};
            }else if(i!=mp[sum1].fi&&i!=mp[sum1].se&&j!=mp[sum1].fi&&j!=mp[sum1].se){
                cout<<"YES"<<endl;
                cout<<i<<" "<<j<<" "<<mp[sum1].fi<<" "<<mp[sum1].se<<endl;
                return 0;
            }
        }
    }
    cout<<"NO"<<endl;
    return 0;
}