#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 10, MAXC = 2e6 + 5e5 + 10;
int n;
int x[MAXC << 1], y[MAXC << 1];
int a[MAXN], cnt[MAXC << 1];
bool have_ans;
int main() {
	scanf("%d", &n);
	for(int i = 1; i <= n; i++) 
	{
		scanf("%d", &a[i]);
	}
	for(int i = 1; i <= n; i++) 
	{
		for(int j = i + 1; j <= n; j++) 
		{
			if(cnt[a[i] + a[j]]) 
			{
				if(x[a[i] + a[j]] != i && y[a[i] + a[j]] != i 
                && x[a[i] + a[j]] != j && y[a[i] + a[j]] != j) 
				{
					cout << "YES" << endl << i << " " << j << " " << x[a[i] + a[j]] << " " << y[a[i] + a[j]] << endl;
					return 0;
				}
			} else 
			{
				cnt[a[i] + a[j]]++;
				x[a[i] + a[j]] = i; y[a[i] + a[j]] = j;
			}
		}
	}
	cout << "NO" << endl;
	return 0;
}