#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int i;
  int xall = 0, yall = 0, zall = 0, x, y, z;
  for (i = 0; i < n; i++) {
    cin >> x;
    xall = xall + x;
    cin >> y;
    yall = yall + y;
    cin >> z;
    zall = zall + z;
  }
  if (xall == 0 && yall == 0 && zall == 0)
    cout << "YES";
  else
    cout << "NO";
}
