#include<iostream>
#include<cstdio>
using namespace std;
int d[110];
int main(){
for(int i=1;i<=100;i++) cin>>d[i];
int max=0,loc=0;
for(int i=1;i<=100;i++){
if(d[i]>max) {
max=d[i];
loc=i;
}
}
cout<<max<<endl;
cout<<loc;
return 0;
}