#include <iostream>
using namespace std;
int arr[110];
int max_Value = -1;
int index = -1;
int main(void)
{
for (int i = 1; i <= 100; i++) {
cin >> arr[i];
if (max_Value < arr[i]) {
max_Value = arr[i];
index = i;
}
}
cout << max_Value << endl;
cout << index << endl;
return 0;
}