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