Doubt in Mr Pr in a Dilemma(Problem Code:ICM2008) solution

Hello, I am new to programming and starting out with C++. I saw various other solutions and they have taken the mod of differences between two numbers. Whereas, what I did is as below.

#include <bits/stdc++.h> using namespace std; int main(){ int num_cases; cin>>num_cases; while(num_cases--){ int a,b,c,d; cin>>a>>b>>c>>d; if((a+d)==(b+c) || (a+c)==(b+d)) cout<<"YES"<<endl; else cout<<"NO"<<endl; } return 0; }

Please can anyone spot out what is the problem in this. I’d be really grateful.

Give your submission link!