#include <iostream>
using namespace std;
int main(){
int res = 0, index;
int a, b;
for(int i = 1; i <= 100; i ++ ){
cin >> a;
if(a >= res){
res = a;
index = i;
}
}
cout << res << endl;
cout << index;
return 0;
}