#include <bits/stdc++.h>
#define MAX 1000000001
#define f for
//#define OFFLINE 1
using namespace std;
/********************************************/
void arrayInput(int a[],int n){
    f(int i=0;i<n;i++) cin>>a[i];
}

vector<int> vectorArray(int n){
    vector <int> toReturn;
    for(int i=0;i<n;i++){int t;cin>>t;toReturn.push_back(t);}return toReturn;
}
/********************************************/
typedef pair<int, int> Pair;

void findPairs(int arr[], int n)
{
    map<int, vector<Pair> > map;
    for (int i = 0; i < n - 1; i++) {
        for (int j = i + 1; j < n; j++) {
            int sum = arr[i] + arr[j];
            if (map.find(sum) != map.end()) {
                for (auto pair : map.find(sum)->second) {
                    int m = pair.first, n = pair.second;
                    if ((m != i && m != j) && (n != i && n != j)) {
                        cout<<"YES\n";
                        cout << 1+i << " "
                             << 1+j << " "
                             << m+1 << " " << n+1<<endl;
                        return;
                    }
                }
            }
            map[sum].push_back({ i, j });
        }
    }
    cout << "NO\n";
}

int main(){
    #ifdef OFFLINE
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
    #endif
    ios :: sync_with_stdio(false);
    cin.tie(0);
    
    int n;cin>>n;
    int a[n],s=-1;
    map<int,int> m;
    for(int i=0;i<n;i++){
        cin>>a[i];
        m[a[i]]++;
        if(m[a[i]]>=4)
            s=a[i];
    }
    if(s==-1)
    findPairs(a,n);
    else{
        cout<<"YES\n";
        int k=0;
        for(int i=0;i<n;i++){
            if(a[i]==s && k<4){     
                cout<<i+1<<" ";
                k++;
            }
        }
    }
    return 0;
}