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