#include <bits/stdc++.h>
using namespace std;
int main() {
  int cases;
  cin >> cases;
  int a = 0, b = 0, c = 0;
  int x, y, z;
  while (cases--) {
    cin >> x >> y >> z;
    a += x;
    b += y;
    c += z;
  }
  if (a == 0 && b == 0 && c == 0)
    cout << "YES";
  else
    cout << "NO";
}
