#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int a = 0, b = 0, c = 0;
  while (n--) {
    int n1, n2, n3;
    cin >> n1 >> n2 >> n3;
    a += n1;
    b += n2;
    c += n3;
  }
  if (a == 0 && b == 0 && c == 0)
    cout << "YES\n";
  else
    cout << "NO\n";
}
