#include <bits/stdc++.h>
int main() {
  int n, a = 0, b = 0, c = 0, x, y, z, i;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d%d%d", &x, &y, &z);
    a = a + x, b = b + y, c = c + z;
  }
  if (a == 0 && b == 0 && c == 0)
    printf("YES");
  else
    printf("NO");
}
