fork download
  1. // بسم الله الرحمن الرحيم
  2.  
  3. #include <bits/stdc++.h>
  4. using namespace std;
  5.  
  6. template<typename T> ostream& operator<<(ostream& os, vector<T>& v) { for (auto& i : v) os << i << ' '; return os; }
  7. template<typename T> istream& operator>>(istream& is, vector<T>& v) { for (auto& i : v) is >> i; return is; }
  8.  
  9. #define FreePalestine ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
  10.  
  11. #define endl '\n'
  12. #define int long long
  13. #define ull unsigned long long
  14. #define vi vector<int>
  15. #define vvi vector<vi>
  16. #define pi pair<int, int>
  17. #define all(a) a.begin(), a.end()
  18. #define all_r(a) a.rbegin(), a.rend()
  19.  
  20. const int N = 2e5, oo = 2e18, MOD = 1e9+7;
  21.  
  22. void solve() {
  23. vi a(3); cin >> a;
  24. sort(all(a));
  25. int sum = a[0] + a[1] + a[2];
  26. if (a[0] != a[1] && a[1] != a[2]) {
  27. int mx = *max_element(all(a));
  28. if (mx == (sum - mx)) {
  29. cout << "YES\n";
  30. } else {
  31. cout << "NO\n";
  32. }
  33. } else if (a[0] == a[1] && a[2] % 2 == 0) {
  34. cout << "YES\n";
  35. } else if (a[1] == a[2] && a[0] % 2 == 0) {
  36. cout << "YES\n";
  37. } else {
  38. cout << "NO\n";
  39. }
  40. }
  41.  
  42.  
  43. signed main() {
  44. FreePalestine;
  45. // #ifndef ONLINE_JUDGE
  46. // freopen("input.txt", "r", stdin);
  47. // freopen("output.txt", "w", stdout);
  48. // #endif
  49. int t; t = 1;
  50. cin >> t;
  51. while (t--) solve();
  52. return 0;
  53. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
YES