fork download
  1. #include<bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. #define BAI VINH
  6. #define ll long long
  7. #define FIO() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
  8. #define open() freopen(BAI".INP","r",stdin); freopen(BAI".OUT","w",stdout);
  9.  
  10. int main(){
  11. //open();
  12. FIO();
  13. int n; cin >> n;
  14. int c[2] = {0, 0};
  15. for (int i = 0; i < n; i++) {
  16. ll x, y; cin >> x >> y;
  17. c[abs(x + y) % 2]++;
  18. }
  19. if (n % 2 == 0 && c[0] == c[1]) cout << "YES";
  20. else cout << "NO";
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
YES