#include <iostream>
using namespace std;
int main(){
int t , index = 1, max = 1<<31;
for(int i = 1; cin>>t; i++){
if(max < t){
max = t;
index = i;
}
}
printf("%d\n%d", max, index);
return 0;
}