#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, y, z, Z = 0, X = 0, Y = 0;
  scanf("%d", &n);
  for (register int i = 0; i < n; i++) {
    scanf("%d %d %d", &x, &y, &z);
    X += x;
    Y += y;
    Z += z;
  }
  if (X == 0 && Y == 0 && Z == 0)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
