#include <bits/stdc++.h>
using namespace std;
int main() {
  ios ::sync_with_stdio(false);
  int i, n, a = 0, b = 0, c = 0, x, y, z;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> x >> y >> z;
    a += x;
    b += y;
    c += z;
  }
  if (a || b || c) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
  }
}
