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