#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  int lines;
  scanf("%d", &lines);
  vector<int> res(3, 0);
  for (int l = 0; l < lines; ++l) {
    int x, y, z;
    scanf("%d %d %d", &x, &y, &z);
    res[0] += x;
    res[1] += y;
    res[2] += z;
  }
  if (res[0] == 0 && res[1] == 0 && res[2] == 0) {
    printf("%s\n", "YES");
  } else {
    printf("%s\n", "NO");
  }
  return 0;
}
