#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int A[n][3];
  int x = 0;
  int y = 0;
  int z = 0;
  for (int i = 0; i < n; i++) {
    int a, b, c;
    cin >> a >> b >> c;
    A[i][0] = a;
    A[i][1] = b;
    A[i][2] = c;
  }
  for (int i = 0; i < n; i++) {
    x = x + A[i][0];
    y = y + A[i][1];
    z = z + A[i][2];
  }
  if (x == 0 && y == 0 && z == 0) {
    cout << "YES";
  } else {
    cout << "NO";
  }
}
