#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n;
  cin >> n;
  long long int x, y, z;
  long long int sum = 0, sum1 = 0, sum2 = 0;
  for (long long int i = 0; i < n; i++) {
    cin >> x >> y >> z;
    sum += x;
    sum1 += y;
    sum2 += z;
  }
  if (sum1 == 0 && sum == 0 && sum2 == 0) {
    cout << "YES"
         << "\n";
  } else {
    cout << "NO"
         << "\n";
  }
  return 0;
}
