program takaku
  implicit none
  integer :: N,i,suml,yn
  integer,allocatable :: L(:)
  read(*,*) N
  allocate(L(N))
  read(*,*) L
  suml=sum(L)
  yn=0
  do i=1,N
     if(L(i).lt.(suml-L(i))) then
 
     else
        yn=1
     endif
  enddo
  if(yn.eq.1) then
     write(*,'(a)') 'No'
  else
     write(*,'(a)') 'Yes'
  endif
 
  deallocate(L)
 
 
 
end program takaku
; 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"

@_QFEl.0 = internal unnamed_addr global ptr null
@_QFEl.8 = internal unnamed_addr global i64 0
@_QQcl.38d5e3e2b64f5fc67717f6449497c72e = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_5008/source.f\00"
@_QQcl.286129 = linkonce constant [3 x i8] c"(a)"
@_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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #1

define void @_QQmain() local_unnamed_addr {
  %1 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %2 = alloca i32, align 4
  %3 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.38d5e3e2b64f5fc67717f6449497c72e, i32 5)
  %4 = call i1 @_FortranAioInputInteger(ptr %3, ptr nonnull %2, i32 4)
  %5 = call i32 @_FortranAioEndIoStatement(ptr %3)
  %6 = load i32, ptr %2, align 4, !tbaa !3
  %7 = call i32 @llvm.smax.i32(i32 %6, i32 0)
  %8 = zext i32 %7 to i64
  %9 = shl nuw nsw i64 %8, 2
  %10 = call ptr @malloc(i64 %9)
  store ptr %10, ptr @_QFEl.0, align 8, !tbaa !7
  store i64 %8, ptr @_QFEl.8, align 8, !tbaa !7
  %11 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.38d5e3e2b64f5fc67717f6449497c72e, i32 7)
  %.unpack = load ptr, ptr @_QFEl.0, align 8, !tbaa !7
  %.unpack206.unpack.unpack208 = load i64, ptr @_QFEl.8, align 8, !tbaa !7
  store ptr %.unpack, ptr %1, align 8, !tbaa !7
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 1
  store i64 4, ptr %.fca.1.gep, align 8, !tbaa !7
  %.fca.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep, align 8, !tbaa !7
  %.fca.3.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep, align 4, !tbaa !7
  %.fca.4.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 4
  store i8 9, ptr %.fca.4.gep, align 1, !tbaa !7
  %.fca.5.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep, align 2, !tbaa !7
  %.fca.6.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep, align 1, !tbaa !7
  %.fca.7.0.0.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep, align 8, !tbaa !7
  %.fca.7.0.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 1
  store i64 %.unpack206.unpack.unpack208, ptr %.fca.7.0.1.gep, align 8, !tbaa !7
  %.fca.7.0.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep, align 8, !tbaa !7
  %12 = call i1 @_FortranAioInputDescriptor(ptr %11, ptr nonnull %1)
  %13 = call i32 @_FortranAioEndIoStatement(ptr %11)
  %.unpack211 = load ptr, ptr @_QFEl.0, align 8, !tbaa !7
  %.unpack218.unpack.unpack220 = load i64, ptr @_QFEl.8, align 8, !tbaa !7
  %14 = icmp sgt i64 %.unpack218.unpack.unpack220, 0
  br i1 %14, label %.lr.ph.i.preheader, label %_FortranASumInteger4x1_contract_simplified.exit

.lr.ph.i.preheader:                               ; preds = %0
  %min.iters.check = icmp ult i64 %.unpack218.unpack.unpack220, 8
  br i1 %min.iters.check, label %.lr.ph.i.preheader276, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.i.preheader
  %n.vec = and i64 %.unpack218.unpack.unpack220, -8
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %18, %vector.body ]
  %vec.phi250 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %19, %vector.body ]
  %15 = shl i64 %index, 2
  %16 = getelementptr i8, ptr %.unpack211, i64 %15
  %wide.load = load <4 x i32>, ptr %16, align 4, !tbaa !3
  %17 = getelementptr i32, ptr %16, i64 4
  %wide.load251 = load <4 x i32>, ptr %17, align 4, !tbaa !3
  %18 = add <4 x i32> %wide.load, %vec.phi
  %19 = add <4 x i32> %wide.load251, %vec.phi250
  %index.next = add nuw i64 %index, 8
  %20 = icmp eq i64 %index.next, %n.vec
  br i1 %20, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %19, %18
  %21 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %.unpack218.unpack.unpack220, %n.vec
  br i1 %cmp.n, label %_FortranASumInteger4x1_contract_simplified.exit, label %.lr.ph.i.preheader276

.lr.ph.i.preheader276:                            ; preds = %.lr.ph.i.preheader, %middle.block
  %.ph = phi i32 [ 0, %.lr.ph.i.preheader ], [ %21, %middle.block ]
  %.ph277 = phi i64 [ 0, %.lr.ph.i.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph.i

.lr.ph.i:                                         ; preds = %.lr.ph.i.preheader276, %.lr.ph.i
  %22 = phi i32 [ %27, %.lr.ph.i ], [ %.ph, %.lr.ph.i.preheader276 ]
  %23 = phi i64 [ %28, %.lr.ph.i ], [ %.ph277, %.lr.ph.i.preheader276 ]
  %24 = shl i64 %23, 2
  %25 = getelementptr i8, ptr %.unpack211, i64 %24
  %26 = load i32, ptr %25, align 4, !tbaa !3
  %27 = add i32 %26, %22
  %28 = add nuw nsw i64 %23, 1
  %exitcond.not.i = icmp eq i64 %28, %.unpack218.unpack.unpack220
  br i1 %exitcond.not.i, label %_FortranASumInteger4x1_contract_simplified.exit, label %.lr.ph.i, !llvm.loop !12

_FortranASumInteger4x1_contract_simplified.exit:  ; preds = %.lr.ph.i, %middle.block, %0
  %.lcssa.i = phi i32 [ 0, %0 ], [ %21, %middle.block ], [ %27, %.lr.ph.i ]
  %29 = load i32, ptr %2, align 4, !tbaa !3
  %30 = icmp sgt i32 %29, 0
  br i1 %30, label %.lr.ph.preheader, label %._crit_edge.thread

.lr.ph.preheader:                                 ; preds = %_FortranASumInteger4x1_contract_simplified.exit
  %31 = zext i32 %29 to i64
  %min.iters.check254 = icmp ult i32 %29, 8
  br i1 %min.iters.check254, label %.lr.ph.preheader273, label %vector.ph255

vector.ph255:                                     ; preds = %.lr.ph.preheader
  %n.vec257 = and i64 %31, 4294967288
  %ind.end = or i64 %n.vec257, 1
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %.lcssa.i, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert266 = insertelement <4 x i32> poison, i32 %.lcssa.i, i64 0
  %broadcast.splat267 = shufflevector <4 x i32> %broadcast.splatinsert266, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body260

vector.body260:                                   ; preds = %vector.body260, %vector.ph255
  %index261 = phi i64 [ 0, %vector.ph255 ], [ %index.next268, %vector.body260 ]
  %vec.phi262 = phi <4 x i32> [ zeroinitializer, %vector.ph255 ], [ %38, %vector.body260 ]
  %vec.phi263 = phi <4 x i32> [ zeroinitializer, %vector.ph255 ], [ %39, %vector.body260 ]
  %32 = getelementptr i32, ptr %.unpack211, i64 %index261
  %wide.load264 = load <4 x i32>, ptr %32, align 4, !tbaa !3
  %33 = getelementptr i32, ptr %32, i64 4
  %wide.load265 = load <4 x i32>, ptr %33, align 4, !tbaa !3
  %34 = sub <4 x i32> %broadcast.splat, %wide.load264
  %35 = sub <4 x i32> %broadcast.splat267, %wide.load265
  %36 = icmp slt <4 x i32> %wide.load264, %34
  %37 = icmp slt <4 x i32> %wide.load265, %35
  %38 = select <4 x i1> %36, <4 x i32> %vec.phi262, <4 x i32> <i32 1, i32 1, i32 1, i32 1>
  %39 = select <4 x i1> %37, <4 x i32> %vec.phi263, <4 x i32> <i32 1, i32 1, i32 1, i32 1>
  %index.next268 = add nuw i64 %index261, 8
  %40 = icmp eq i64 %index.next268, %n.vec257
  br i1 %40, label %middle.block252, label %vector.body260, !llvm.loop !13

middle.block252:                                  ; preds = %vector.body260
  %rdx.select.cmp.not = icmp ne <4 x i32> %38, zeroinitializer
  %rdx.select.cmp269272 = icmp ne <4 x i32> %39, zeroinitializer
  %rdx.select.cmp269 = select <4 x i1> %rdx.select.cmp.not, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i1> %rdx.select.cmp269272
  %41 = bitcast <4 x i1> %rdx.select.cmp269 to i4
  %.not = icmp ne i4 %41, 0
  %rdx.select270 = zext i1 %.not to i32
  %cmp.n259 = icmp eq i64 %n.vec257, %31
  br i1 %cmp.n259, label %._crit_edge, label %.lr.ph.preheader273

.lr.ph.preheader273:                              ; preds = %.lr.ph.preheader, %middle.block252
  %indvars.iv.ph = phi i64 [ 1, %.lr.ph.preheader ], [ %ind.end, %middle.block252 ]
  %.0247.ph = phi i32 [ 0, %.lr.ph.preheader ], [ %rdx.select270, %middle.block252 ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader273, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader273 ]
  %.0247 = phi i32 [ %spec.select, %.lr.ph ], [ %.0247.ph, %.lr.ph.preheader273 ]
  %42 = add i64 %indvars.iv, -1
  %43 = getelementptr i32, ptr %.unpack211, i64 %42
  %44 = load i32, ptr %43, align 4, !tbaa !3
  %45 = sub i32 %.lcssa.i, %44
  %46 = icmp slt i32 %44, %45
  %spec.select = select i1 %46, i32 %.0247, i32 1
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv, %31
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !14

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %47 = icmp eq i32 %spec.select, 1
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %middle.block252
  %spec.select.lcssa = phi i1 [ %.not, %middle.block252 ], [ %47, %._crit_edge.loopexit ]
  br i1 %spec.select.lcssa, label %48, label %._crit_edge.thread

48:                                               ; preds = %._crit_edge
  %49 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.38d5e3e2b64f5fc67717f6449497c72e, i32 18)
  %50 = call i1 @_FortranAioOutputAscii(ptr %49, ptr nonnull @_QQcl.4E6F, i64 2)
  br label %53

._crit_edge.thread:                               ; preds = %_FortranASumInteger4x1_contract_simplified.exit, %._crit_edge
  %51 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.38d5e3e2b64f5fc67717f6449497c72e, i32 20)
  %52 = call i1 @_FortranAioOutputAscii(ptr %51, ptr nonnull @_QQcl.596573, i64 3)
  br label %53

53:                                               ; preds = %48, %._crit_edge.thread
  %.sink = phi ptr [ %49, %48 ], [ %51, %._crit_edge.thread ]
  %54 = call i32 @_FortranAioEndIoStatement(ptr %.sink)
  %.unpack223 = load ptr, ptr @_QFEl.0, align 8, !tbaa !7
  call void @free(ptr %.unpack223)
  store ptr null, ptr @_QFEl.0, align 8, !tbaa !7
  store i64 0, ptr @_QFEl.8, align 8, !tbaa !7
  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 i1 @_FortranAioInputDescriptor(ptr, 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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #3

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #1 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nocallback nofree nosync nounwind 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"}
!7 = !{!8, !8, i64 0}
!8 = !{!"descriptor member", !5, i64 0}
!9 = distinct !{!9, !10, !11}
!10 = !{!"llvm.loop.isvectorized", i32 1}
!11 = !{!"llvm.loop.unroll.runtime.disable"}
!12 = distinct !{!12, !11, !10}
!13 = distinct !{!13, !10, !11}
!14 = distinct !{!14, !11, !10}
