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