#include <bits/stdc++.h>
int main() {
  int i = 0, n, x = 0, y = 0, z = 0;
  scanf("%d", &n);
  int ax[n], ay[n], az[n];
  while (i < n) {
    scanf("%d %d %d", &ax[i], &ay[i], &az[i]);
    x = x + ax[i];
    y = y + ay[i];
    z = z + az[i];
    i++;
  }
  if (x == 0 && y == 0 && z == 0)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
