#include <iostream>
#include <algorithm>
#include <tuple>
#include <vector>
#include <string>
#include <queue>
#include <cmath>
#include <set>
#include <map>
#include <cassert>

using namespace std;
using ll = long long;

int main()
{
    int n;
    cin >> n;
    vector<ll> a(n);
    vector<set<ll>> st(200);
    vector<vector<ll>> ans(200);
    for(int i = 0; i < n; i++){
        cin >> a[i];
    }
    int num = min(8, n);
    for(int bit = 1; bit < (1<<num); bit++){
        ll tmp = 0;
        vector<ll> tans;
        for(int i = 0; i < num; i++){
            if(bit&(1<<i)){
                tmp = (tmp+a[i])%200;
                tans.push_back(i+1);
            }
        }
        if(st[tmp%200].size() > 0){
            sort(tans.begin(), tans.end());
            cout << "Yes" << endl;
            cout << tans.size();
            for(int z: tans){
                cout << " " << z;
            }
            cout << endl;
            cout << ans[tmp%200].size();
            for(int z: ans[tmp%200]){
                cout << " " << z;
            }
            cout << endl;
            return 0;
        }else{
            for(int z: tans){
                ans[tmp%200].push_back(z);
            }
            sort(ans[tmp%200].begin(), ans[tmp%200].end());
            st[tmp%200].insert(tmp%200);
        }
    }
    cout << "No" << endl;
    return 0;
}
#ifdef LOGX
#define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
using namespace std;
//#include <atcoder/all>
//using namespace atcoder;

/*---------macro---------*/
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = s; i < (int)(n); i++)
#define unless(x) if(!(x))
#define until(x) while(!(x))
#define ALL(a) a.begin(),a.end()
#define RALL(a) a.rbegin(),a.rend()
#define mybit(i,j) (((i)>>(j))&1)

/*---------type/const---------*/
const int big=1000000007;
//const int big=998244353;
const double EPS=1e-8; //適宜変える
typedef long long ll;
typedef unsigned long long ull;
typedef std::string::const_iterator state; //構文解析
const int dx[4]={1,0,-1,0};
const int dy[4]={0,1,0,-1};
const char newl='\n';
struct{
    constexpr operator int(){return -int(1e9)-10;}
    constexpr operator ll(){return -ll(1e18)-10;}
}neginf;
struct{
    constexpr operator int(){return int(1e9)+10;}
    constexpr operator ll(){return ll(1e18)+10;}
    constexpr auto operator -(){return neginf;}
}inf;

/*---------debug---------*/
#ifdef LOGX
#include <template/debug.hpp>
#else
#define dbg(...) ;
#define dbgnewl ;
#define prt(x) ;
#define _prt(x) ;
#endif

/*---------function---------*/
template<typename T> T max(const std::vector<T> &a){T ans=a[0];for(T elem:a){ans=max(ans,elem);}return ans;}
template<typename T> T min(const std::vector<T> &a){T ans=a[0];for(T elem:a){ans=min(ans,elem);}return ans;}
template<typename T,typename U> bool chmin(T &a,const U b){if(a>b){a=b;return true;}return false;}
template<typename T,typename U> bool chmax(T &a,const U b){if(a<b){a=b;return true;}return false;}
bool valid(int i,int j,int h,int w){return (i>=0 && j>=0 && i<h && j<w);}
template<class T,class U>T expm(T x,U y,const ll mod=big){T res=1;while(y){if(y&1)(res*=x)%=mod;(x*=x)%=mod;y>>=1;}return res;}
template<class T,class U>T exp(T x,U y){T res=1;while(y){if(y&1)res*=x;x*=x;y>>=1;}return res;}



int main(){
    //std::ios::sync_with_stdio(false);
    //std::cin.tie(nullptr);
    std::cout.precision(10);
/*------------------------------------*/
    
    int n;
    std::cin >> n;
    std::vector<int> idx(n),idy(n);
    iota(ALL(idx),0);
    iota(ALL(idy),0);
    std::vector<int> x(n),y(n);
    set<int> a;
    rep(i,n)cin >> x[i] >> y[i];
    sort(ALL(idx),[&](int i,int j){return x[i]<x[j];});
    sort(ALL(idy),[&](int i,int j){return y[i]<y[j];});
    a.insert(idx[0]);
    a.insert(idx[1]);
    a.insert(idx[n-1]);
    a.insert(idx[n-2]);
    a.insert(idy[0]);
    a.insert(idy[1]);
    a.insert(idy[n-1]);
    a.insert(idy[n-2]);
    priority_queue<int> q;
    set<pair<int,int>> al;
    for(int i:a)for(int j:a){
        if(al.count({i,j}) || al.count({j,i}))continue;
        q.push(max(abs(x[i]-x[j]), abs(y[i]-y[j])));
        al.insert({i,j});
    }
    q.pop();
    cout << q.top() << newl;
}