https://www.acmicpc.net/problem/2562
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st;
int first=0;
int frist_index =1;
for(int i=1; i< 10; i++){
st = new StringTokenizer(br.readLine());
int x = Integer.parseInt(st.nextToken());
if(first < x){
first = x;
frist_index = i;
}
}
System.out.println(first + "\n" + frist_index);
}
}