#include <bits/stdc++.h>
int main() {
  int n, a, b, c, asum = 0, bsum = 0, csum = 0;
  scanf("%d", &n);
  while (n--) {
    scanf("%d%d%d", &a, &b, &c);
    asum += a;
    bsum += b;
    csum += c;
  }
  if (!asum && !bsum && !csum)
    printf("YES");
  else
    printf("NO");
  return 0;
}
