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