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