For this Question: Given an 8*8 empty chessboard in which a rook is placed at a position (X, Y). Your task is to find the minimum steps Rook will take to go to the position (1, 1).The input contains two integer X and Y.

Constraints:-
1 <= X <= 8
1 <= Y <= 8Print the number of steps rook will take to go to the position (X, Y).Sample Input:-
2 4

Sample Output:-
2

Explanation:-
one of the possible paths is:-
(2, 4) - > (2, 1) - > (1, 1)

Sample Input:-
1 2

Sample Output:-
1, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args) {

        Scanner scan = new Scanner(System.in);
        int X = scan.nextInt();
        int Y = scan.nextInt();
        if((X == 1) && (Y == 1)){
            System.out.println(0);
        }
        else if((X == 1) || (Y == 1)){
            System.out.println(1);
        }
        else{
            System.out.println(2);
        }
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?