Language: C++

#include <cstdio>
#include <cstring>
#include <cstdint>
#include <cstdlib>

#include <type_traits>

namespace FastIn {
  static constexpr size_t BUF_SIZE=1<<17, INT_LEN=24, FLT_LEN=400;
  static char buf[BUF_SIZE|1]={}, *pos=buf, *endbuf=nullptr;

  inline bool rebuffer() {
    size_t rest=endbuf-pos;
    if (rest > pos-buf) {
      // not disjoint
      return true;
    }

    // disjoint
    std::memcpy(buf, pos, rest);

    pos = buf;

    size_t len=std::fread(pos+rest, 1, BUF_SIZE-rest, stdin);
    *(endbuf = buf + (rest+len)) = 0;

    return *pos;
  }

  inline bool scan(char &in) {
    if ((in = *pos)) {
      ++pos;
      return true;
    }

    return rebuffer() && (in = *pos++);
  }

  inline bool scan(char *in) {
    if ((*in = *pos) == 0) {
      if (rebuffer() && (*in = *pos) == 0) {
        return false;
      }
    }
    ++in;
    while (true) {
      if ((*in = *pos++) == 0) {
        if (rebuffer() && (*in = *pos++) == 0) {
          return true;
        }
      }
      ++in;
    }
  }

  inline bool scan(double &in) {
    if (pos + FLT_LEN >= endbuf && !rebuffer()) {
      in = 0.0;
      return false;
    }

    char *tmp;
    in = std::strtod(pos, &tmp);
    pos = tmp;
    return true;
  }

  template <class Int>
  inline bool scan(
      Int &in,
      typename std::enable_if<std::is_signed<Int>::value>::type *un=nullptr
  ) {
    in = 0;

    // assume that no redundant whitespace appears
    if (pos + INT_LEN >= endbuf && !rebuffer()) {
      return false;
    }

    // assume that ' ' < '+' < '-' < '0' < '9'
    while (*pos < '-') {
      ++pos;
    }

    bool neg=false;
    if (*pos == '-') {
      ++pos;
      neg = true;
    }

    // assume that numbers are separated by the character whose value is
    // less than '0' (e.g. whitespaces, newlines)
    do {
      in = in*10 + (*pos)-'0';
    } while (*++pos >= '0');

    if (neg) {
      in = -in;
    }

    ++pos;
    return true;
  }

  template <class Int>
  inline bool scan(
      Int &in,
      typename std::enable_if<!std::is_signed<Int>::value>::type *un=nullptr
  ) {
    in = 0;

    // assume that no redundant whitespace appears
    if (pos + INT_LEN >= endbuf && !rebuffer()) {
      return false;
    }

    // assume that ' ' < '0' < '9' and minus signs do not appear
    //while (*pos < '0') {
    //  ++pos;
    //}

    // assume that numbers are separated by the character whose value is
    // less than '0' (e.g. whitespaces, newlines)
    do {
      in = in*10 + (*pos)-'0';
    } while (*++pos >= '0');

    ++pos;
    return true;
  }

  inline bool eat() {
    if (*pos > ' ') {
      return true;
    }

    do {
      if (*pos == 0 && !rebuffer()) {
        return false;
      }
    } while (*++pos <= ' ');

    return true;
  }
      
  inline bool eat(char ch) {
    if (*pos == ch) {
      return true;
    }

    do {
      if (*pos == 0 && !rebuffer()) {
        return false;
      }
    } while (*++pos != ch);

    return true;
  }

  class Scanner {
    bool rebuffer() {
      return FastIn::rebuffer();
    }

  public:
    Scanner() {
      endbuf = pos + std::fread(buf, 1, BUF_SIZE, stdin);
    }

    template <class T>
    inline bool scan(T &in) {
      return FastIn::scan(in);
    }

    template <class First, class... Rest>
    inline bool scan(First &in, Rest &...ins) {
      return scan(in) && scan(ins...);
    }
  };
}

FastIn::Scanner cin;

int main() {
  unsigned N;
  cin.scan(N);

  unsigned T=0, X=0, Y=0;
  for (unsigned i=0; i<N; ++i) {
    unsigned t, x, y;
    cin.scan(t, x, y);

    if ((T+t+X+x+Y+y) & 1)
      return !printf("No\n");

    // XXX hacked
    if (t-T < std::abs(X-x+Y-y))
      return !printf("No\n");

    T = t;
    X = x;
    Y = y;
  }

  puts("Yes");
}

Compiler output:
a.cc: In function 'int main()':
a.cc:197:23: error: call of overloaded 'abs(unsigned int)' is ambiguous
  197 |     if (t-T < std::abs(X-x+Y-y))
      |               ~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/cstdlib:79,
                 from a.cc:4:
/usr/include/stdlib.h:980:12: note: candidate: 'int abs(int)'
  980 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
      |            ^~~
In file included from /usr/include/c++/14/cstdlib:81:
/usr/include/c++/14/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)'
   56 |   abs(long __i) { return __builtin_labs(__i); }
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)'
   61 |   abs(long long __x) { return __builtin_llabs (__x); }
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)'
   71 |   abs(double __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)'
   75 |   abs(float __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)'
   79 |   abs(long double __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:85:3: note: candidate: 'constexpr __int128 std::abs(__int128)'
   85 |   abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; }
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:137:3: note: candidate: 'constexpr __float128 std::abs(__float128)'
  137 |   abs(__float128 __x)
      |   ^~~