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

int n, T, pro, a[5000005], b[5000005], c[5000005];

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 pro = a[i] + a[j];
            if(!b[pro]) b[pro] = i, c[pro] = j;
            else{
                if(b[pro] != i && c[pro] != j && b[pro] != j && c[pro] != i){
                    printf("YES\n%d %d %d %d\n", i, j, b[pro], c[pro]);
                    return 0;
                }
            }
        }
    puts("NO");
    return 0;
}
