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