//usr/bin/env picoc $0 - $@;exit
#include <stdio.h>
int main(){
	int n,t=0,x=0,y=0;
	for(scanf("%d",&n);n--;){
		int t0,x0,y0;
		scanf("%d%d%d",&t0,&x0,&y0);
		{
			int dt=t0-t,dx=x0-x,dy=y0-y;
			if(dx+dy>dt || (dt-dx-dy)%2){
				puts("No");
				return 0;
			}
		}
		t=t0;x=x0;y=y0;
	}
	puts("Yes");
	return 0;
}

; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_621/source.m'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_621/source.m"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"

@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1
@.str.2 = private unnamed_addr constant [3 x i8] c"No\00", align 1
@.str.3 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1

; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #0 {
entry:
  %n = alloca i32, align 4
  %t0 = alloca i32, align 4
  %x0 = alloca i32, align 4
  %y0 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3
  %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n)
  %0 = load i32, ptr %n, align 4, !tbaa !5
  %dec37 = add nsw i32 %0, -1
  store i32 %dec37, ptr %n, align 4, !tbaa !5
  %tobool.not38 = icmp eq i32 %0, 0
  br i1 %tobool.not38, label %for.end, label %for.body

for.body:                                         ; preds = %entry, %for.cond
  %t.041 = phi i32 [ %1, %for.cond ], [ 0, %entry ]
  %x.040 = phi i32 [ %2, %for.cond ], [ 0, %entry ]
  %y.039 = phi i32 [ %3, %for.cond ], [ 0, %entry ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t0) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x0) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y0) #3
  %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %t0, ptr noundef nonnull %x0, ptr noundef nonnull %y0)
  %1 = load i32, ptr %t0, align 4
  %sub = sub nsw i32 %1, %t.041
  %2 = load i32, ptr %x0, align 4
  %sub2 = sub nsw i32 %2, %x.040
  %3 = load i32, ptr %y0, align 4
  %sub3 = sub nsw i32 %3, %y.039
  %add = add nsw i32 %sub3, %sub2
  %cmp = icmp sgt i32 %add, %sub
  br i1 %cmp, label %.thread35, label %lor.lhs.false

lor.lhs.false:                                    ; preds = %for.body
  %sub5 = sub i32 %sub, %add
  %4 = and i32 %sub5, 1
  %tobool6.not = icmp eq i32 %4, 0
  br i1 %tobool6.not, label %for.cond, label %.thread35

.thread35:                                        ; preds = %lor.lhs.false, %for.body
  %call7 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y0) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x0) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t0) #3
  br label %cleanup16

for.cond:                                         ; preds = %lor.lhs.false
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y0) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x0) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t0) #3
  %5 = load i32, ptr %n, align 4, !tbaa !5
  %dec = add nsw i32 %5, -1
  store i32 %dec, ptr %n, align 4, !tbaa !5
  %tobool.not = icmp eq i32 %5, 0
  br i1 %tobool.not, label %for.end, label %for.body

for.end:                                          ; preds = %for.cond, %entry
  %call15 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3)
  br label %cleanup16

cleanup16:                                        ; preds = %.thread35, %for.end
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3
  ret i32 0
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.linker.options = !{}
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
