program Traveling
    implicit none
    integer(4):: n,i
    integer(4):: t,x,y

    read*, n

    do i=1,n
        read*, t,x,y
        if (t < x+y .or. mod(t,2) /= mod(x+y,2)) then
            print*, 'No'
            stop
        end if
    end do

    print*, 'Yes'


end program Traveling
; ModuleID = 'FIRModule'
source_filename = "FIRModule"
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"

@_QQcl.cc018a6bdc2f692b45db9c5688b2cb1a = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_6396/source.f\00"
@_QQcl.4E6F = linkonce constant [2 x i8] c"No"
@_QQcl.596573 = linkonce constant [3 x i8] c"Yes"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.cc018a6bdc2f692b45db9c5688b2cb1a, i32 6)
  %6 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %1, i32 4)
  %7 = call i32 @_FortranAioEndIoStatement(ptr %5)
  %8 = load i32, ptr %1, align 4, !tbaa !3
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph, label %._crit_edge

10:                                               ; preds = %.lr.ph
  %11 = add nsw i32 %.034, -1
  %12 = icmp sgt i32 %.034, 1
  br i1 %12, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %0, %10
  %.034 = phi i32 [ %11, %10 ], [ %8, %0 ]
  %13 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.cc018a6bdc2f692b45db9c5688b2cb1a, i32 9)
  %14 = call i1 @_FortranAioInputInteger(ptr %13, ptr nonnull %2, i32 4)
  %15 = call i1 @_FortranAioInputInteger(ptr %13, ptr nonnull %3, i32 4)
  %16 = call i1 @_FortranAioInputInteger(ptr %13, ptr nonnull %4, i32 4)
  %17 = call i32 @_FortranAioEndIoStatement(ptr %13)
  %18 = load i32, ptr %2, align 4, !tbaa !3
  %19 = load i32, ptr %3, align 4, !tbaa !3
  %20 = load i32, ptr %4, align 4, !tbaa !3
  %21 = add i32 %20, %19
  %22 = icmp slt i32 %18, %21
  %23 = srem i32 %18, 2
  %24 = srem i32 %21, 2
  %25 = icmp ne i32 %23, %24
  %26 = or i1 %22, %25
  br i1 %26, label %27, label %10

27:                                               ; preds = %.lr.ph
  %28 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.cc018a6bdc2f692b45db9c5688b2cb1a, i32 11)
  %29 = call i1 @_FortranAioOutputAscii(ptr %28, ptr nonnull @_QQcl.4E6F, i64 2)
  %30 = call i32 @_FortranAioEndIoStatement(ptr %28)
  %31 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable

._crit_edge:                                      ; preds = %10, %0
  %32 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.cc018a6bdc2f692b45db9c5688b2cb1a, i32 16)
  %33 = call i1 @_FortranAioOutputAscii(ptr %32, ptr nonnull @_QQcl.596573, i64 3)
  %34 = call i32 @_FortranAioEndIoStatement(ptr %32)
  ret void
}

declare ptr @_FortranAioBeginExternalListInput(i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioInputInteger(ptr, ptr, i32) local_unnamed_addr

declare i32 @_FortranAioEndIoStatement(ptr) local_unnamed_addr

declare ptr @_FortranAioBeginExternalListOutput(i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputAscii(ptr, ptr, i64) local_unnamed_addr

declare {} @_FortranAStopStatement(i32, i1, i1) local_unnamed_addr

!llvm.module.flags = !{!0, !1, !2}

!0 = !{i32 2, !"Debug Info Version", i32 3}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{!4, !4, i64 0}
!4 = !{!"any data access", !5, i64 0}
!5 = !{!"any access", !6, i64 0}
!6 = !{!"Flang Type TBAA Root"}
