#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:64000000")
template <class T>
inline T sqr(T x) {
  return x * x;
}
int n;
int main() {
  scanf("%d", &n);
  int xx = 0, yy = 0, zz = 0;
  for (int x, y, z; n--;) {
    scanf("%d%d%d", &x, &y, &z);
    xx += x, yy += y, zz += z;
  }
  if (!xx && !yy && !zz)
    puts("YES");
  else
    puts("NO");
  return 0;
}
