#include <iostream>
#include <cstdio>
int main() {
int max_value = 0, position = 0;
for (int i = 1; i <= 100; i++) {
int value;
scanf("%d", &value);
if (max_value < value) {
max_value = value;
position = i;
}
}
printf("%d\n%d\n", max_value, position);
}