#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a = 0, b = 0, c = 0;
  int temp1, temp2, temp3;
  for (int i = 0; i < n; i++) {
    cin >> temp1 >> temp2 >> temp3;
    a += temp1;
    b += temp2;
    c += temp3;
  }
  if (a == 0 && b == 0 && c == 0) {
    cout << "YES"
         << "\n";
  } else {
    cout << "NO"
         << "\n";
  }
  return 0;
}
