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