#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdlib>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <sstream>
#include <string>
#include <vector>
using namespace std;

typedef long long ll, lint;
typedef long double ldouble;

#define sz(v) ((int) (v).size())
#define FOR(i, n) for (int (i) = 0; (i) < (n); (i)++)
#define For(i, n) for (int (i) = 0; (i) < (n); (i)++)
#define all(v) (v).begin(), (v).end()

#define mp make_pair
#define pb push_back
#define fst first
#define snd second

template<class T>
string to_string(T arr, int len = 1e9) {
    stringstream ss;
    int i = 0;
    for (auto item : arr) {
        ss << item << ' ';
        if (++i == len)
            break;
    }
    return ss.str();
}

#ifdef LOCAL
    #define dbg(expr) cout << "[line " << __LINE__ << "] " << (#expr) << ": " << (expr) << endl;
#else
    #define dbg(expr) (void) 0;
#endif


const double pi = acos(-1);

struct Point {
    typedef lint T;
    T x, y;

    Point() {}

    Point(T x, T y): x(x), y(y) {}

    Point operator +(Point other) const {
        return Point(x + other.x, y + other.y);
    }

    Point operator -(Point other) const {
        return Point(x - other.x, y - other.y);
    }

    Point operator *(double k) const {
        return Point(x * k, y * k);
    }

    Point operator /(double k) const {
        return Point(x / k, y / k);
    }

    T scl(Point other) const {
        return x * other.x + y * other.y;
    }

    T vect(Point other) const {
        return x * other.y - y * other.x;
    }

    Point rotate(double alpha) const {
        double new_x = x * cos(alpha) - y * sin(alpha);
        double new_y = x * sin(alpha) + y * cos(alpha);
        return Point(new_x, new_y);
    }

    double len() const {
        return sqrt(this->scl(*this));
    }

    T len2() const {
        return this->scl(*this);
    }

    bool operator ==(Point other) const {
        //return eq(x, other.x) && eq(y, other.y);
        return x == other.x && y == other.y;
    }

    bool collinear_to(Point other) const {
        //return eq(vect(other), 0);
        return vect(other) == 0;
    }

    bool on_line(Point A, Point B) const {
        //return eq((A - *this).vect(B - *this), 0);
        return (A - *this).vect(B - *this) == 0;
    }

    bool on_segment(Point A, Point B) const {
        //return on_line(A, B) && le((A - *this).scl(B - *this), 0);
        return on_line(A, B) && (A - *this).scl(B - *this) <= 0;
    }

    double dist_to(Point A) const {
        return (A - *this).len();
    }

    friend istream & operator >>(istream & input, Point & cur) {
        input >> cur.x >> cur.y;
        return input;
    }

    friend ostream & operator <<(ostream & output, const Point & cur) {
        output << cur.x << ' ' << cur.y;
        return output;
    }
};

lint dist(Point A, Point B) {
    return abs(A.x - B.x) + abs(A.y - B.y);
}

int main() {
#ifndef LOCAL
    cin.tie(0);
    ios_base::sync_with_stdio(false);
#endif

    int n;
    cin >> n;
    vector<int> t(n);
    vector<Point> points(n);
    For(i, n) {
        cin >> t[i];
        cin >> points[i];
    }
    int cur_t = 0;
    auto cur = Point(0, 0);
    For (i, n) {
        auto d = dist(cur, points[i]);
        int delta = t[i] - cur_t;
        if (d > delta || d % 2 != delta % 2) {
            cout << "No" << endl;
            return 0;
        }
        cur = points[i];
        cur_t = t[i];
    }
    cout << "Yes" << endl;
}

Measured memory_bytes: 2176