#pragma O2
#include <bits/stdc++.h>
#include<unordered_set>
#include<unordered_map>
using namespace std;
//#define int long long
#define endl "\n"
const int maxl=1e7+7;
const int mod=998244353;
struct node
{
    int a,b,w;
    bool operator<(const node&t)const
    {
        return w<t.w;
    }
};
signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    multiset<node> qaq;
    int n;
    srand(time(0));
    cin>>n;
    vector<pair<int,int>> nana(n+10);
    for(int i=1;i<=n;i++)
        cin>>nana[i].first,nana[i].second=i;
    random_shuffle(nana.begin()+1,nana.begin()+1+n,[](int i){return rand()%i;});
    //sort(nana.begin()+1,nana.begin()+1+n);
    for(int i=1;i<=n;i++)
    {
        for(int j=i+1;j<=n;j++)
        {
            auto p=qaq.find(node{0,0,nana[i].first+nana[j].first});
            if(p!=qaq.end()&&p->b!=nana[j].second&&p->b!=nana[i].second)
            {
                cout<<"YES"<<endl;
                cout<<nana[i].second<<" "<<nana[j].second<<" "<<p->a<<" "<<p->b;
                return 0;
            }
        }
        for(int j=i+1;j<=n;j++)
            qaq.insert(node{nana[i].second,nana[j].second,nana[i].first+nana[j].first});
    }
    cout<<"NO"<<endl;
}
