Language: C++

#include <bits/stdc++.h>
#define REP(i, n) for (int (i) = 0; (i) < (int)(n); i++) 
#define FOR(i, a, b) for(int (i) = a; (i) < (int)b; i++)
#define RREP(i, n) for(int (i)=((int)(n)-1); (i)>=0; i--)
#define RFOR(i, a, b) for(int (i) =((int)(b)-1); (i)>=(int)a; i--)
#define ALL(v) (v).begin(),(v).end()
#define MOD 1000000007
#define FT first
#define SC second
#define MP make_pair
#define PB push_back

using namespace std ;
typedef long long ll;
typedef vector<int> vint;
typedef vector<vint> vvint;
typedef vector<string> vstr;
typedef pair<int, int> pint;
const int INF = 1e9;
const double EPS = 1e-9;


int main()
{
  int n ;
  cin >> n ;
  vector<tuple<int,int,int>> vec(n+1) ;
  vec.at(0) = make_tuple(0,0,0) ;
  
  REP(i,n){
    int a, b, c ;
    cin >> a >> b >> c ;
    vec.at(i+1) = make_tuple(a,b,c) ;
  }
  
  REP(i,n){
    if((get<1>(vec.at(i+1))-get<1>(vec.at(i)))%2!=(abs(get<2>(vec.at(i+1))-get<2>(vec.at(i))+abs(get<3>(vec.at(i+1))-get<3>(vec.at(i))))%2){
      cout << "No"<<endl ;
      return 0 ;
    }
  }
  cout << "Yes" <<endl ;
      

  return 0 ;
}




Compiler output:
In file included from /usr/include/c++/14/bits/memory_resource.h:47,
                 from /usr/include/c++/14/string:68,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/tuple: In instantiation of 'struct std::tuple_element<3, std::tuple<int, int, int> >':
/usr/include/c++/14/bits/utility.h:84:11:   required by substitution of 'template<long unsigned int __i, class _Tp> using std::__tuple_element_t = typename std::tuple_element::type [with long unsigned int __i = 3; _Tp = std::tuple<int, int, int>]'
   84 |     using __tuple_element_t = typename tuple_element<__i, _Tp>::type;
      |           ^~~~~~~~~~~~~~~~~
/usr/include/c++/14/tuple:2466:5:   required by substitution of 'template<long unsigned int __i, class ... _Elements> constexpr std::__tuple_element_t<__i, std::tuple<_Elements ...> >&& std::get(const tuple<_Elements ...>&&) [with long unsigned int __i = 3; _Elements = {int, int, int}]'
 2466 |     get(const tuple<_Elements...>&& __t) noexcept
      |     ^~~
a.cc:37:104:   required from here
   37 |     if((get<1>(vec.at(i+1))-get<1>(vec.at(i)))%2!=(abs(get<2>(vec.at(i+1))-get<2>(vec.at(i))+abs(get<3>(vec.at(i+1))-get<3>(vec.at(i))))%2){
      |                                                                                                  ~~~~~~^~~~~~~~~~~~~
/usr/include/c++/14/tuple:2422:25: error: static assertion failed: tuple index must be in range
 2422 |       static_assert(__i < sizeof...(_Types), "tuple index must be in range");
      |                     ~~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/tuple:2422:25: note: the comparison reduces to '(3 < 3)'
In file included from /usr/include/c++/14/bits/stl_pair.h:62,
                 from /usr/include/c++/14/bits/stl_algobase.h:64,
                 from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51:
/usr/include/c++/14/bits/utility.h: In instantiation of 'struct std::_Nth_type<3, int, int, int>':
/usr/include/c++/14/tuple:2424:13:   required from 'struct std::tuple_element<3, std::tuple<int, int, int> >'
 2424 |       using type = typename _Nth_type<__i, _Types...>::type;
      |             ^~~~
/usr/include/c++/14/bits/utility.h:84:11:   required by substitution of 'template<long unsigned int __i, class _Tp> using std::__tuple_element_t = typename std::tuple_element::type [with long unsigned int __i = 3; _Tp = std::tuple<int, int, int>]'
   84 |     using __tuple_element_t = typename tuple_element<__i, _Tp>::type;
      |           ^~~~~~~~~~~~~~~~~
/usr/include/c++/14/tuple:2466:5:   required by substitution of 'template<long unsigned int __i, class ... _Elements> constexpr std::__tuple_element_t<__i, std::tuple<_Elements ...> >&& std::get(const tuple<_Elements ...>&&) [with long unsigned int __i = 3; _Elements = {int, int, int}]'
 2466 |     get(const tuple<_Elements...>&& __t) noexcept
      |     ^~~
a.cc:37:104:   required from here
   37 |     if((get<1>(vec.at(i+1))-get<1>(vec.at(i)))%2!=(abs(get<2>(vec.at(i+1))-get<2>(vec.at(i))+abs(get<3>(vec.at(i+1))-get<3>(vec.at(i))))%2){
      |                                                                                                  ~~~~~~^~~~~~~~~~~~~
/usr/include/c++/14/bits/utility.h:237:13: error: '__type_pack_element' index is out of range
  237 |     { using type = __type_pack_element<_Np, _Types...>; };
      |             ^~~~
a.cc: In function 'int main()':
a.cc:37:104: error: use of deleted function 'constexpr std::__enable_if_t<(__i >= sizeof... (_Types))> std::get(const tuple<_Elements ...>&) [with long unsigned int __i = 3; _Elements = {int, int, int}; __enable_if_t<(__i >= sizeof... (_Types))> = void]'
   37 |     if((get<1>(vec.at(i+1))-get<1>(vec.at(i)))%2!=(abs(get<2>(vec.at(i+1))-get<2>(vec.at(i))+abs(get<3>(vec.at(i+1))-get<3>(vec.at(i))))%2){
      |                                                                                                  ~~~~~~^~~~~~~~~~~~~
/usr/include/c++/14/tuple:2476:5: note: declared here
 2476 |     get(const tuple<_Elements...>&) = delete;
      |     ^~~
a.cc:37:104: note: use '-fdiagnostics-all-candidates' to display considered candidates
   37 |     if((get<1>(vec.at(i+1))-get<1>(vec.at(i)))%2!=(abs(get<2>(vec.at(i+1))-get<2>(vec.at(i))+abs(get<3>(vec.at(i+1))-get<3>(vec.at(i))))%2){
      |                                                                                                  ~~~~~~^~~~~~~~~~~~~
a.cc:37:124: error: use of deleted function 'constexpr std::__enable_if_t<(__i >= sizeof... (_Types))> std::get(const tuple<_Elements ...>&) [with long unsigned int __i = 3; _Elements = {int, int, int}; __enable_if_t<(__i >= sizeof... (_Types))> = void]'
   37 |     if((get<1>(vec.at(i+1))-get<1>(vec.at(i)))%2!=(abs(get<2>(vec.at(i+1))-get<2>(vec.at(i))+abs(get<3>(vec.at(i+1))-get<3>(vec.at(i))))%2){
      |                                                                                                                      ~~~~~~^~~~~~~~~~~
/usr/include/c++/14/tuple:2476:5: note: declared here
 2476 |     get(const tuple<_Elements...>&) = delete;
      |     ^~~
a.cc:37:124: note: use '-fdiagnostics-all-candidates' to display considered candidates
   37 |     if((get<1>(vec.at(i+1))-get<1>(vec.at(i)))%2!=(abs(get<2>(vec.at(i+1))-get<2>(vec.at(i))+abs(get<3>(vec.at(i+1))-get<3>(vec.at(i))))%2){
      |                                                                                                                      ~~~~~~^~~~~~~~~~~
a.cc:37:140: error: expected ')' before '{' token
   37 |     if((get<1>(vec.at(i+1))-get<1>(vec.at(i)))%2!=(abs(get<2>(vec.at(i+1))-get<2>(vec.at(i))+abs(get<3>(vec.at(i+1))-get<3>(vec.at(i))))%2){
      |       ~                                                                                                                                    ^
      |                                                                                                                                            )
a.cc:41:3: error: expected primary-expression before '}' token
   41 |   }
      |   ^