#include <bits/stdc++.h>
int main() {
  int x, y, z;
  x = y = z = 0;
  int many;
  scanf("%d", &many);
  getchar();
  for (int i = 0; i < many; i++) {
    int tx, ty, tz;
    scanf("%d %d %d", &tx, &ty, &tz);
    x += tx;
    y += ty;
    z += tz;
  }
  if (x == 0 && y == 0 && z == 0) {
    printf("YES\n");
  } else {
    printf("NO\n");
  }
  return 0;
}
