#include<iostream>
#include<bits/stdc++.h>
#define m_p make_pair
#define fi first
#define se second
#define pb push_back
typedef long long ll;
#define f(i,n) for(ll i=0;i<n;i++)
#define f1(i,n) for(ll i=1;i<=n;i++)
#define   crap ios_base::sync_with_stdio(0); cin.tie(0);cout.tie(0)
using namespace std;
#define INF 1000000
#define vll vector<ll>
const int M = 1e9+7;
ll fastpower(ll x,ll n,ll M)
{
    if(n==0)
        return 1;
    else if(n%2 == 0)        //n is even
        return fastpower((x*x)%M,n/2,M);
    else                             //n is odd
        return (x*fastpower((x*x)%M,(n-1)/2,M))%M;
}
ll GCD(ll A, ll B) {
    if(B==0)
        return A;
    else
        return GCD(B, A % B);
}
bool vowl(char c)
{
  return c=='a'||c=='e'||c=='i'||c=='o'||c=='u';
}
ll modInverse(ll A,ll M)// when M is prime
{
    return fastpower(A,M-2,M);
}
void sieve(ll N) {
        bool isPrime[N+1];
        for(ll i = 0; i <= N;++i) {
            isPrime[i] = true;
        }
        isPrime[0] = false;
        isPrime[1] = false;
        for(ll i = 2; i * i <= N; ++i) {
             if(isPrime[i] == true) {                    //Mark all the multiples of i as composite numbers
                 for(ll j = i * i; j <= N ;j += i)
                     isPrime[j] = false;
            }
        }
    }
vector<ll> factorize(ll n) {
    vector<ll> res;
    for (ll i = 2; i * i <= n; ++i) {
        while (n % i == 0) {
            res.push_back(i);
            n /= i;
        }
    }
    if (n != 1) {
        res.push_back(n);
    }
    return res;
}
void solve();
int main()
{
  crap;
  #ifndef ONLINE_JUDGE
      freopen("input.txt","r",stdin);
      freopen("output.txt","w",stdout);
      #endif
      solve();
  return 0;
}

void solve()
{
  ll n;
  cin>>n;
  vector<pair<ll,ll> > arr;
  f(i,n)
  {
    ll x;
    cin>>x;
    arr.pb({x,i+1});
  }
  unordered_map<int,pair<int,int> > m;
  sort(arr.begin(),arr.end());
  for(int i=0;i<n;i++)
  {
    for(int j=0;j<i;j++)
    {
        auto it=m.find(arr[i].fi+arr[j].fi);
        if(it==m.end())
          m[arr[i].first+arr[j].fi]={arr[j].second,arr[i].second};
        else
        {
          if(it->second.first!=arr[j].second&&it->second.second!=arr[j].second&&arr[i].se!=it->se.se)
          {
             cout<<"YES"<<endl;
             cout<<it->second.first<<" "<<it->se.se<<" "<<arr[i].se<<" "<<arr[j].se<<endl;
            return ;
          }
        }
    }
  }
  cout<<"NO";
  return ;
}