#include <bits/stdc++.h>
using namespace std;
int main() {
  int s1, s2, s3, n;
  s1 = s2 = s3 = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int t1, t2, t3;
    scanf("%d %d %d", &t1, &t2, &t3);
    s1 += t1;
    s2 += t2;
    s3 += t3;
  }
  printf("%s\n", s1 == 0 and s2 == 0 and s3 == 0 ? "YES" : "NO");
  return 0;
}
