implicit none
integer :: n
integer :: i
integer, allocatable :: a(:)
logical :: p

read *,n
allocate(a(n))
read *,(a(i),i=1,n)

p = .false.
do i = 1, n
   if (mod(a(i),2) == 1) then
      p = .not. p
   endif
enddo

if (p) then
   print '(a)','NO'
else
   print '(a)','YES'
endif
end
; 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.0 = internal unnamed_addr global ptr null
@_QQcl.6510c61dcd270b005ad0ae2b6427cdb5 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_7513/source.f\00"
@_QQcl.286129 = linkonce constant [3 x i8] c"(a)"
@_QQcl.4E4F = linkonce constant [2 x i8] c"NO"
@_QQcl.594553 = 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

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i32, align 4
  %2 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.6510c61dcd270b005ad0ae2b6427cdb5, i32 7)
  %3 = call i1 @_FortranAioInputInteger(ptr %2, ptr nonnull %1, i32 4)
  %4 = call i32 @_FortranAioEndIoStatement(ptr %2)
  %5 = load i32, ptr %1, align 4, !tbaa !3
  %6 = call i32 @llvm.smax.i32(i32 %5, i32 0)
  %7 = zext i32 %6 to i64
  %8 = shl nuw nsw i64 %7, 2
  %9 = call ptr @malloc(i64 %8)
  store ptr %9, ptr @_QFEa.0, align 8, !tbaa !7
  %10 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.6510c61dcd270b005ad0ae2b6427cdb5, i32 9)
  %11 = load i32, ptr %1, align 4, !tbaa !3
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph.preheader, label %._crit_edge

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

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %14 = phi i64 [ %19, %.lr.ph ], [ 1, %.lr.ph.preheader ]
  %.unpack75 = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  %sext = shl i64 %14, 32
  %15 = ashr exact i64 %sext, 32
  %16 = add nsw i64 %15, -1
  %17 = getelementptr i32, ptr %.unpack75, i64 %16
  %18 = call i1 @_FortranAioInputInteger(ptr %10, ptr %17, i32 4)
  %19 = add nuw nsw i64 %14, 1
  %exitcond.not = icmp eq i64 %14, %13
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %0
  %20 = call i32 @_FortranAioEndIoStatement(ptr %10)
  %21 = load i32, ptr %1, align 4, !tbaa !3
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %.lr.ph89, label %._crit_edge90.thread

.lr.ph89:                                         ; preds = %._crit_edge
  %23 = zext i32 %21 to i64
  %.unpack = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  %xtraiter = and i64 %23, 1
  %24 = icmp eq i32 %21, 1
  br i1 %24, label %._crit_edge90.unr-lcssa, label %.lr.ph89.new

.lr.ph89.new:                                     ; preds = %.lr.ph89
  %unroll_iter = and i64 %23, 4294967294
  br label %25

25:                                               ; preds = %25, %.lr.ph89.new
  %indvars.iv = phi i64 [ 1, %.lr.ph89.new ], [ %indvars.iv.next.1, %25 ]
  %.087 = phi i32 [ 0, %.lr.ph89.new ], [ %.1.1, %25 ]
  %niter = phi i64 [ 0, %.lr.ph89.new ], [ %niter.next.1, %25 ]
  %26 = add nsw i64 %indvars.iv, -1
  %27 = getelementptr i32, ptr %.unpack, i64 %26
  %28 = load i32, ptr %27, align 4, !tbaa !3
  %29 = and i32 %28, -2147483647
  %30 = icmp eq i32 %29, 1
  %.not74 = icmp eq i32 %.087, 0
  %31 = zext i1 %.not74 to i32
  %.1 = select i1 %30, i32 %31, i32 %.087
  %32 = getelementptr i32, ptr %.unpack, i64 %indvars.iv
  %33 = load i32, ptr %32, align 4, !tbaa !3
  %34 = and i32 %33, -2147483647
  %35 = icmp eq i32 %34, 1
  %.not74.1 = icmp eq i32 %.1, 0
  %36 = zext i1 %.not74.1 to i32
  %.1.1 = select i1 %35, i32 %36, i32 %.1
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge90.unr-lcssa.loopexit, label %25

._crit_edge90.unr-lcssa.loopexit:                 ; preds = %25
  %37 = add nuw nsw i64 %indvars.iv, 1
  br label %._crit_edge90.unr-lcssa

._crit_edge90.unr-lcssa:                          ; preds = %._crit_edge90.unr-lcssa.loopexit, %.lr.ph89
  %.1.lcssa.ph = phi i32 [ undef, %.lr.ph89 ], [ %.1.1, %._crit_edge90.unr-lcssa.loopexit ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph89 ], [ %37, %._crit_edge90.unr-lcssa.loopexit ]
  %.087.unr = phi i32 [ 0, %.lr.ph89 ], [ %.1.1, %._crit_edge90.unr-lcssa.loopexit ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge90, label %._crit_edge90.epilog-lcssa

._crit_edge90.epilog-lcssa:                       ; preds = %._crit_edge90.unr-lcssa
  %38 = getelementptr i32, ptr %.unpack, i64 %indvars.iv.unr
  %39 = load i32, ptr %38, align 4, !tbaa !3
  %40 = and i32 %39, -2147483647
  %41 = icmp eq i32 %40, 1
  %.not74.epil = icmp eq i32 %.087.unr, 0
  %42 = zext i1 %.not74.epil to i32
  %.1.epil = select i1 %41, i32 %42, i32 %.087.unr
  br label %._crit_edge90

._crit_edge90:                                    ; preds = %._crit_edge90.unr-lcssa, %._crit_edge90.epilog-lcssa
  %.1.lcssa = phi i32 [ %.1.lcssa.ph, %._crit_edge90.unr-lcssa ], [ %.1.epil, %._crit_edge90.epilog-lcssa ]
  %43 = icmp eq i32 %.1.lcssa, 0
  br i1 %43, label %._crit_edge90.thread, label %44

44:                                               ; preds = %._crit_edge90
  %45 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.6510c61dcd270b005ad0ae2b6427cdb5, i32 19)
  %46 = call i1 @_FortranAioOutputAscii(ptr %45, ptr nonnull @_QQcl.4E4F, i64 2)
  br label %49

._crit_edge90.thread:                             ; preds = %._crit_edge, %._crit_edge90
  %47 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.6510c61dcd270b005ad0ae2b6427cdb5, i32 21)
  %48 = call i1 @_FortranAioOutputAscii(ptr %47, ptr nonnull @_QQcl.594553, i64 3)
  br label %49

49:                                               ; preds = %44, %._crit_edge90.thread
  %.sink = phi ptr [ %45, %44 ], [ %47, %._crit_edge90.thread ]
  %50 = 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

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

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #1 = { 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"}
!7 = !{!8, !8, i64 0}
!8 = !{!"descriptor member", !5, i64 0}
