#include <bits/stdc++.h>
using namespace std;
int main() {
  int a1[100], a2[100], a3[100];
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a1[i] >> a2[i] >> a3[i];
  }
  int s1 = 0, s2 = 0, s3 = 0;
  for (int i = 0; i < n; ++i) {
    s1 += a1[i];
    s2 += a2[i];
    s3 += a3[i];
  }
  if (s1 == 0 && s2 == 0 && s3 == 0) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
}
