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: #include <iostream>
using namespace std;
int Rook(int X, int Y){
//Enter your code here
if(X==1 && Y==1){return 0;}
if(X==1 || Y==1){return 1;}
return 2;
}

int main(){
    int x,y;
    scanf("%d%d",&x,&y);
   printf("%d",Rook(x,y));
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?