TEST CASES COMING WRONG

I have send my code
WHEN im submitting the code 2 test cases are right nd other re wrong

logic is correct
use long long int instead of int because of
Constraints
1 ≤ N,M,X,Y ≤ 10^9​​

Modified Code