#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;
    cin>>n;
    int a[n];
    int trmin = 1000000001;
    int ind;
    for(int i=0;i<n;i++){
        cin>>a[i];
        trmin = min(trmin, a[i]);
        if(trmin == a[i]) ind  = i;
    }
    for(int i=0;i<n-1;i++){
        int c,b;
        cin>>c>>b;
    }
    cout<<trmin<<endl;
    cout<<1<<endl;
    cout<<ind+1<<endl;
    cout<<0<<endl;
}