#include <bits/stdc++.h>
int main() {
  int n, x[10000], y[1000], z[1000], i, sum_x = 0, sum_y = 0, sum_z = 0;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d %d %d", &x[i], &y[i], &z[i]);
    sum_x += x[i];
    sum_y += y[i];
    sum_z += z[i];
  }
  if (sum_x == 0 && sum_y == 0 && sum_z == 0) {
    printf("YES");
  } else {
    printf("NO");
  }
  return 0;
}
