#include <bits/stdc++.h>
#define pb push_back
#define ss second
#define ff first
#define all(x) x.begin(), x.end()
#define INF 3000000000000001 // 3e15
#define ll_max 9000000000000000000
#define PI 3.14159265358979323846L
#define fill(a, n, x) for(int i = 0; i < n; i++) a[i] = x;
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
typedef long long int ll;
typedef long double ld;
typedef pair<ll,ll> pll;
const ll mod = 1000000007;
const ll N = 200110;
const ll M = log2(N) + 1;

struct point
{
    ll x, y;
};

template<typename T>
T fast_exp(T x,T n)
{
    if(n == 0) return 1;
    T ans = 1;
    if(n % 2 == 0)
    {
         ans = fast_exp(x, n / 2);
         ans = ans * ans % mod;
    }
    else ans = fast_exp(x, n - 1) * x % mod;
    return ans;
}

void update(ll BIT[], ll i, ll x, ll n)
{
    if(i <= 0) return;
    for(; i <= n; i += i & (-i))
        BIT[i] += x;
}

ll query(ll BIT[], ll l, ll r)
{
    l--;
    ll sum = 0;
    while(r > 0)
    {
        sum += BIT[r];
        r = r & (r - 1);
    }
    while(l > 0)
    {
        sum -= BIT[l];
        l = l & (l - 1);
    }
    return sum;
}

ll fact[2], infact[2];
void work()
{
    fact[0] = fact[1] = infact[0] = infact[1] = 1;
    for(ll i = 2; i < N; i++)
    {
        fact[i] = fact[i - 1] * i % mod;
        infact[i] = fast_exp(fact[i], mod - 2);
    }
}

ll ncr(ll n, ll r)
{
    if(r > n || r < 0) return 0;
    return fact[n] * infact[n - r] % mod * infact[r] % mod;
}

vector<int> p;
int smfactor[N + 1]; // smallest prime factor
void SoE(int n = N)
{
    bool Primes[n + 1];
    Primes[0] = Primes[1] = 0;
    for(int i = 2; i < n + 1; i++)
        Primes[i] = 1;
    for(int i = 2; i <= n; i++)
    {
       if(Primes[i] == 1)
       {
           p.push_back(i);
           for(int j = i; j <= n; j += i)
           {
               Primes[j] = 0;
               if(smfactor[j] == 0)
                    smfactor[j] = i;
           }
       }
    }
}
ll cnt[6000000];
int main()
{
    fast;
    int _ = 1, test = 0;
    //cin >> _;
    while(_--)
    {
        test++;
        ll n, m = 0, x, y, ans = 0, k, q;
        cin >> n;
        ll a[n + 1];
        for(int i = 1; i <= n; i++) cin >> a[i], cnt[a[i]]++, ans = max(a[i], ans);
        for(int i = 1; i <= ans; i++)
        {
            if(cnt[i] >= 4)
            {
                x = 0;
                cout << "YES\n";
                for(int j = 1; j <= n; j++)
                {
                    if(i == a[j])
                    {
                        cout << j << " ";
                        x++;
                    }
                    if(x == 4)
                        return 0;
                }
            }
        }
        map<ll, vector<pll>> mp;
        for(int i = 1; i <= n; i++)
        {
            for(int j = i + 1; j <= n; j++)
            {
                ll sum = a[i] + a[j];
                mp[sum].pb({i, j});
                vector<pll> &v = mp[sum];
                for(int k = 0; k < v.size() - 1; k++)
                {
                    if(v[k].ff != i && v[k].ss != j && v[k].ss != i)
                    {
                        cout << "YES\n";
                        cout << i << " " << j << " " << v[k].ff << " " << v[k].ss << "\n";
                        return 0;
                    }
                }
            }
        }
        cout << "NO\n";
    }
    return 0;
}
