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