#include <stdio.h>

int main(){
    int arr[9][9];
    int max_value=0, max_i=1, max_j=1;
    
    for(int i=0; i<9; i++){
        for(int j=0; j<9; j++){
            scanf("%d",&arr[i][j]);
            if(max_value<arr[i][j]){
                max_value = arr[i][j];
                max_i = i+1;
                max_j = j+1;
            }
        }
    }

    printf("%d\n%d %d",max_value,max_i,max_j);

    return 0;
}