#include <bits/stdc++.h>
int main() {
  int t;
  int a[2];
  int i, q = 0;
  int p = 0, r = 0;
  scanf("%d", &t);
  while (t--) {
    for (i = 0; i <= 2; i++) {
      scanf("%d", &a[i]);
    }
    p = p + a[0];
    q = q + a[1];
    r = r + a[2];
  }
  if (p == 0 && q == 0 && r == 0)
    printf("YES");
  else
    printf("NO");
  return 0;
}
