import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int[] arr = new int[9];
int[] arr2 = new int[9];
int max, index=0;
for (int i=0; i<9; i++) {
arr[i] = sc.nextInt();
arr2[i] = arr[i];
}
Arrays.sort(arr);
for (int i = 0; i <= 8; i++) {
if (arr[8] == arr2[i]) {
index = i+1;
}
}
System.out.print(arr[8] + "\n");
System.out.print(index);
sc.close();
}
}
import java.util.Arrays;
Arrays.sort(arr); //์ค๋ฆ์ฐจ์ ์ํธ
https://coding-factory.tistory.com/549