#include<bits/stdc++.h>
using namespace std;

#define all(x) (x).begin(),(x).end()
#define pb push_back
#define pf push_front
#define sz(x) (int)(x).size()
#define lb lower_bound 
#define ub upper_bound 
#define mp make_pair
#define fi first
#define se second
#define setbits(x) __builtin_popcount(x)
#define zerobits(x) __builtin_ctz(x)
#define setbitsll(x) __builtin_popcountll(x)
#define zerobitsll(x) __builtin_ctzll(x)
#define ps(x,y) fixed<<setprecision(y)<<x

typedef vector<int> vi;
typedef long long ll;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef unsigned long long ull;
typedef long double ld;
typedef map<int,int> mii;

const int MOD = 1e9+7;
const ld PI = acos((ld)-1);
const int maxN = 2.5e6+1;

vi pos[maxN];
map<int,vector<pii>> ma;

void solve () {
	int n;
	cin >> n;
	vi arr(n+1);
	for (int i = 1;i <= n;++i) {
		cin >> arr[i];
		pos[arr[i]].pb(i);
	}
	int val1 = 0,val2 = 0;
	for (int i = 1;i < maxN;++i) {
		if ((int)pos[i].size() >= 4) {
			cout << "YES\n";
			for (int j = 0;j < 4;++j) {
				cout << pos[i][j] << " ";
			}
			return;
		} else if ((int)pos[i].size() >= 2) {
			if (!val1) {
				val1 = i;
			} else {
				val2 = i;
			}
		}
	}
	if (val1 && val2) {
		cout << "YES\n";
		cout << pos[val1][0] << " " << pos[val2][0] << " " << pos[val1][1] << " " << pos[val2][1] << '\n';
		return;
	}
	for (int i = 1;i <= n;++i) {
		for (int j = i+1;j <= n;++j) {
			int sum = arr[i]+arr[j];
			if (ma.count(sum)) {
				for (pii p: ma[sum]) {
					if (p.fi != i && p.se != i && p.fi != j && p.se != j) {
						cout << "YES\n";
						cout << i << " " << j << " " << p.fi << " " << p.se << '\n';
						return;
					}
				}
			}
			ma[sum].pb({i,j});
		}
	}
	cout << "NO\n";
}

int main () {

#ifndef ONLINE_JUDGE
	freopen("input1.txt","r",stdin);
	freopen("output1.txt","w",stdout);
#endif

	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	solve();
	return 0;
}

 