You’re given four numbers a, b, c, d. You have to determine if you can make a rectangle of such lengthes.
Do what the problem asks you to do.
In other words you have to check if two smallest and two largest numbers among this four are same. To do this you can sort all four numbers in whatever way you like and check that first two and last two numbers are both same. Example of solution:
int a; cin >> a >> a >> a >> a; sort(a, a + 4); cout << (a == a && a == a ? "YES" : "NO") << "