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

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;

#define PB push_back
#define F first
#define S second
#define MP make_pair
#define endl '\n'

const int inf = 2000000000;
const ll infLL = 9000000000000000000;
#define MOD 1000000007

#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

//
//debug
template<typename F,typename S>ostream&operator<<(ostream&os,const pair<F,S>&p){return os<<"("<<p.first<<", "<<p.second<<")";}
template<typename T>ostream&operator<<(ostream&os,const vector<T>&v){os<<"{";for(auto it=v.begin();it!=v.end();++it){if(it!=v.begin())os<<", ";os<<*it;}return os<<"}";}
template<typename T>ostream&operator<<(ostream&os,const set<T>&v){os<<"[";for(auto it=v.begin();it!=v.end();++it){if(it!=v.begin())os<<",";os<<*it;}return os<<"]";}
template<typename T>ostream&operator<<(ostream&os,const multiset<T>&v) {os<<"[";for(auto it=v.begin();it!=v.end();++it){if(it!=v.begin())os<<", ";os<<*it;}return os<<"]";}
template<typename F,typename S>ostream&operator<<(ostream&os,const map<F,S>&v){os<<"[";for(auto it=v.begin();it!=v.end();++it){if(it!=v.begin())os<<", ";os<<it->first<<" = "<<it->second;}return os<<"]";}
#define dbg(args...) do {cerr << #args << " : "; faltu(args); } while(0)
void faltu(){cerr << endl;}
template<typename T>void faltu(T a[],int n){for(int i=0;i<n;++i)cerr<<a[i]<<' ';cerr<<endl;}
template<typename T,typename...hello>void faltu(T arg,const hello&...rest){cerr<<arg<<' ';faltu(rest...);}
//#else
//#define dbg(args...)

const int mx = 2e5+5;
const int MAXN = 25e5+5;
int n;
int a[mx];
int b[MAXN];
vector<int> vec[MAXN];
vector<pair<int, pii>> ans;
bool used[MAXN];
bool hmm[mx];

int main()
{
	optimize();
	cin >> n;
	for( int i = 1; i <= n; ++i ) {
		cin >> a[i];
		++b[a[i]];
		vec[a[i]].PB(i);
	}
	for( int i = 1; i < MAXN; ++i ) {
		if( (int)vec[i].size() >= 4 ) {
			cout << "YES" << endl;
			for( int j = 0; j < 4; ++j ) {
				cout << vec[i][j] << " ";
			}
			cout << endl;
			return 0;
		}
	}
	vector<int> store;
	for( int i = 1; i < MAXN; ++i ) {
		if( (int)vec[i].size() >= 2 ) {
			store.PB(i);
			if( (int)store.size() == 2 ) break;
		}
	}
	if( (int)store.size() == 2 ) {
		cout << "YES" << endl;
		int u = store[0], v = store[1];
		cout << vec[u][0] << " " << vec[v][0] << " " << vec[u][1] << " " << vec[v][1] << endl;
		return 0;
	}
	if( (int)store.size() == 1 ) {
		for( int i = 1; i < MAXN; ++i ) {
			if( store[0]+i >= MAXN || store[0]-i < 0 ) continue;
			if( b[store[0]+i] && b[store[0]-i] ) {
				cout << "YES" << endl;
				cout << vec[store[0]][0] << " " << vec[store[0]][1] << " " << vec[store[0]+i][0] << " " << vec[store[0]-i][0] << endl;
				return 0;
			}
		}
	}
	for( int i = 1; i <= n; ++i ) {
		if( used[a[i]] ) hmm[i] = 1;
		else used[a[i]] = 1;
	}
	int len = min( n, 4000 );
	for( int i = 1; i <= len; ++i ) {
		if( hmm[i] ) continue;
		for( int j = i+1; j <= len; ++j ) {
			if( hmm[j] ) continue;
			ans.PB( MP(a[i]+a[j], MP(i, j)) );
		}
	}
	sort( ans.begin(), ans.end() );
	for( int i = 1; i < (int)ans.size(); ++i ) {
		if( ans[i].F == ans[i-1].F ) {
			cout << "YES" << endl;
			cout << ans[i].S.F << " " << ans[i].S.S << " " << ans[i-1].S.F << " " << ans[i-1].S.S << endl;
			return 0;
		}
	}
	cout << "NO" << endl;
}





















