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