#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long n;
  cin >> n;
  unsigned long long v1 = 0;
  unsigned long long v2 = 0;
  unsigned long long v3 = 0;
  unsigned long long x, y, z;
  for (int i = 0; i < n; i++) {
    cin >> x >> y >> z;
    v1 += x;
    v2 += y;
    v3 += z;
  }
  if (v1 == 0 && v2 == 0 && v3 == 0) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
