#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    int xs = 0, ys = 0, zs = 0, x, y, z;
    for (int i = 0; i < n; ++i) {
      scanf("%d%d%d", &x, &y, &z);
      xs += x;
      ys += y;
      zs += z;
    }
    if (xs || ys || zs) {
      printf("NO\n");
    } else {
      printf("YES\n");
    }
  }
  return 0;
}
