#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin>>n;
    int arr[n];
    for(int i=0;i<n;i++){
        cin>>arr[i];
    }
    map <int,pair<int,int>> mp;
    for(int i=0;i<min(n,4000);i++){
        for(int j=i+1;j<min(n,4000);j++){
            if(mp.count(arr[i]+arr[j])){
                int a = mp[arr[i]+arr[j]].first;
                int b = mp[arr[i]+arr[j]].second;
                if(a==i || b==i || a==j || b==j){
                    continue;
                }
                else{
                    cout<<"YES"<<endl<<a+1<<" "<<b+1<<" "<<i+1<<" "<<j+1<<endl;
                    return 0;
                }
            }
            else{
                mp[arr[i]+arr[j]] = make_pair(i,j);
            }
        }
    }
    cout<<"NO"<<endl;
    return 0;
}
