Only first three test cases working, Please find the error

Problem name: Winning CB Scholarship

Code solved using long long int
But I didn’t understood that why it didn’t worked with int as
1<=N,M,X,Y<=10^9
and int can store max of 2^32

Please clear this

You need to use long long int only to solve the test cases ,