#include <bits/stdc++.h>
using namespace std;
const int N = 5e6 + 5;
typedef long long ll;
int n,a[N],b[N],m;
struct node{int x,y;};
vector<node>c[N];
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++){
        int sum = a[i] + a[j];
        if(!c[sum].empty()){
            for(auto it : c[sum]){
                if(it.y != j && it.x != i && it.x != j && it.y != i) {printf("YES\n%d %d %d %d",i,j,it.x,it.y);exit(0);}
            }
        }else c[sum].push_back({i,j});
    }
    printf("NO");
    return 0;
}