#include<iostream>
#include<algorithm>
using namespace std;
typedef long long ll; 
const int maxn=5e6+100;
int n;
int a[maxn];
int x[maxn],y[maxn];
int main(){
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>a[i];
	}
	for(int i=1;i<=n;i++){
		for(int j=i+1;j<=n;j++){
			int sum=a[i]+a[j];
			if(x[sum]!=i&&x[sum]!=j&&y[sum]!=i&&y[sum]!=j){
				if(x[sum]&&y[sum]){
					printf("YES\n");
					printf("%d %d %d %d\n",x[sum],y[sum],i,j);
					return 0;
				}
			}
			x[sum]=i;
			y[sum]=j; 
		}
	} 
	printf("NO\n");
}