/*
	Author: AquaBlaze
	Time: 2021-03-13 16:29:09
	Generated by powerful Codeforces Tool :^)
 	You can download the binary file in here https://github.com/xalanq/cf-tool (Windows, macOS, Linux)	
    Keqing best girl :)
    Ganyu is so cuuuute >_<
    Nephren will always be in my heart
*/
#include<bits/stdc++.h>
#define x first
#define y second
#define pb push_back
#define eb emplace_back
#define all(a) (a).begin(),(a).end()
#define SZ(a) (int)(a).size()
#define FOR(i, a, b) for(int i=(a); i<=(b); ++i)
#define ROF(i, a, b) for(int i=(a); i>=(b); --i)
#define make_unique(a) sort(all((a))), (a).resize(unique(all((a)))-(a).begin())
#define pc(x) putchar(x)
#define MP make_pair
#define MT make_tuple
#define TESTCASE int t; cin >> t; while(t--)

using namespace std;

typedef long long i64;
typedef tuple<int,int,int> iii;
typedef pair<int,int> pii;
typedef pair<i64,i64> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;

vector<pii> A[5000002];

void solve(){
    int n;
    scanf("%d",&n);
    vi num(n+1);
    FOR(i, 1, n) scanf("%d",&num[i]);
    int m = min(3170, n);
    FOR(i, 2, m){
        FOR(j, 1, i-1){
            int sum = num[i]+num[j];
            for(const pii &e : A[sum]){
                if(e.x == j || e.y == j) continue;
                // found
                printf("YES\n");
                printf("%d %d %d %d",i,j,e.x,e.y);
                return ;
            }
        }
        FOR(j, 1, i-1){
            int sum = num[i]+num[j];
            A[sum].eb(i,j);
        }
    }
    printf("NO");
}

int main(){
    solve();
	return 0;
}
/*
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */
