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