#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> x;
  vector<int> y;
  vector<int> z;
  for (int i = 0; i < n; i++) {
    int a, b, c;
    cin >> a >> b >> c;
    x.push_back(a);
    y.push_back(b);
    z.push_back(c);
  }
  int a, b, c;
  a = accumulate(x.begin(), x.end(), 0);
  b = accumulate(y.begin(), y.end(), 0);
  c = accumulate(z.begin(), z.end(), 0);
  if (a == 0 && b == 0 && c == 0) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
