program time_limit_exceeded
  implicit none
  integer :: n, l, c, t, i, a = 1001
  read(*,*) n, l
  do i = 1, n
    read(*,*) c, t
    if (t <= l) a = min(a,c)
  end do
  if (a == 1001) then
    write(*,'(a)') "TLE"
  else
    write(*,'(i0)') a
  end if
end program time_limit_exceeded
; 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"

@_QFEa = internal unnamed_addr global i32 1001
@_QQcl.d17e0918337f6e1d6efb0a8a77e72d14 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_5446/source.f\00"
@_QQcl.286129 = linkonce constant [3 x i8] c"(a)"
@_QQcl.544C45 = linkonce constant [3 x i8] c"TLE"
@_QQcl.28693029 = linkonce constant [4 x i8] c"(i0)"
@_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.d17e0918337f6e1d6efb0a8a77e72d14, i32 4)
  %6 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %3, i32 4)
  %7 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %2, i32 4)
  %8 = call i32 @_FortranAioEndIoStatement(ptr %5)
  %9 = load i32, ptr %3, align 4, !tbaa !3
  %10 = icmp sgt i32 %9, 0
  br i1 %10, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %0
  %11 = zext i32 %9 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %23
  %12 = phi i64 [ %24, %23 ], [ %11, %.lr.ph.preheader ]
  %13 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.d17e0918337f6e1d6efb0a8a77e72d14, i32 6)
  %14 = call i1 @_FortranAioInputInteger(ptr %13, ptr nonnull %1, i32 4)
  %15 = call i1 @_FortranAioInputInteger(ptr %13, ptr nonnull %4, i32 4)
  %16 = call i32 @_FortranAioEndIoStatement(ptr %13)
  %17 = load i32, ptr %4, align 4, !tbaa !3
  %18 = load i32, ptr %2, align 4, !tbaa !3
  %.not = icmp sgt i32 %17, %18
  br i1 %.not, label %23, label %19

19:                                               ; preds = %.lr.ph
  %20 = load i32, ptr @_QFEa, align 4, !tbaa !3
  %21 = load i32, ptr %1, align 4, !tbaa !3
  %22 = call i32 @llvm.smin.i32(i32 %20, i32 %21)
  store i32 %22, ptr @_QFEa, align 4, !tbaa !3
  br label %23

23:                                               ; preds = %19, %.lr.ph
  %24 = add nsw i64 %12, -1
  %25 = icmp sgt i64 %12, 1
  br i1 %25, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %23, %0
  %26 = load i32, ptr @_QFEa, align 4, !tbaa !3
  %27 = icmp eq i32 %26, 1001
  br i1 %27, label %28, label %31

28:                                               ; preds = %._crit_edge
  %29 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.d17e0918337f6e1d6efb0a8a77e72d14, i32 10)
  %30 = call i1 @_FortranAioOutputAscii(ptr %29, ptr nonnull @_QQcl.544C45, i64 3)
  br label %35

31:                                               ; preds = %._crit_edge
  %32 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.d17e0918337f6e1d6efb0a8a77e72d14, i32 12)
  %33 = load i32, ptr @_QFEa, align 4, !tbaa !3
  %34 = call i1 @_FortranAioOutputInteger32(ptr %32, i32 %33)
  br label %35

35:                                               ; preds = %28, %31
  %.sink = phi ptr [ %29, %28 ], [ %32, %31 ]
  %36 = call i32 @_FortranAioEndIoStatement(ptr %.sink)
  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 @_FortranAioBeginExternalFormattedOutput(ptr, i64, ptr, i32, ptr, i32) local_unnamed_addr

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

declare i1 @_FortranAioOutputInteger32(ptr, i32) local_unnamed_addr

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #0

attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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"}
