#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n, a, b, c, f1 = 0, f2 = 0, f3 = 0;
  cin >> n;
  while (n--) {
    cin >> a >> b >> c;
    f1 += a;
    f2 += b;
    f3 += c;
  }
  (f1 == 0 && f2 == 0 && f3 == 0) ? cout << "YES" : cout << "NO";
  return 0;
}
