program minpro2019B
    implicit none
    integer(8)::i
    integer(8)::flg=0
    integer(8),dimension(6)::A
    integer(8),dimension(4)::L=0
    read(5,*)(A(i),i=1,6)

    do i=1,6
        L(A(i))=L(A(i))+1
    end do

    do i=1,6
        if(L(i)>=3)flg=1
    end do

    if(flg==1)then
        print'(A)',"NO"
    else
        print'(A)',"YES"
    end if
end program minpro2019B
; 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 global [6 x i64] undef
@_QFEflg = internal unnamed_addr global i1 false
@_QFEl = internal unnamed_addr global [4 x i64] zeroinitializer
@_QQcl.1899a3eee36ac64e3e3606de589c589e = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_4967/source.f\00"
@_QQcl.284129 = 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

define void @_QQmain() local_unnamed_addr {
.preheader.preheader:
  %0 = tail call ptr @_FortranAioBeginExternalListInput(i32 5, ptr nonnull @_QQcl.1899a3eee36ac64e3e3606de589c589e, i32 7)
  %1 = tail call i1 @_FortranAioInputInteger(ptr %0, ptr nonnull @_QFEa, i32 8)
  %2 = tail call i1 @_FortranAioInputInteger(ptr %0, ptr nonnull getelementptr inbounds ([6 x i64], ptr @_QFEa, i64 0, i64 1), i32 8)
  %3 = tail call i1 @_FortranAioInputInteger(ptr %0, ptr nonnull getelementptr inbounds ([6 x i64], ptr @_QFEa, i64 0, i64 2), i32 8)
  %4 = tail call i1 @_FortranAioInputInteger(ptr %0, ptr nonnull getelementptr inbounds ([6 x i64], ptr @_QFEa, i64 0, i64 3), i32 8)
  %5 = tail call i1 @_FortranAioInputInteger(ptr %0, ptr nonnull getelementptr inbounds ([6 x i64], ptr @_QFEa, i64 0, i64 4), i32 8)
  %6 = tail call i1 @_FortranAioInputInteger(ptr %0, ptr nonnull getelementptr inbounds ([6 x i64], ptr @_QFEa, i64 0, i64 5), i32 8)
  %7 = tail call i32 @_FortranAioEndIoStatement(ptr %0)
  %8 = load i64, ptr @_QFEa, align 16, !tbaa !3
  %9 = add i64 %8, -1
  %10 = getelementptr [4 x i64], ptr @_QFEl, i64 0, i64 %9
  %11 = load i64, ptr %10, align 8, !tbaa !3
  %12 = add i64 %11, 1
  store i64 %12, ptr %10, align 8, !tbaa !3
  %13 = load i64, ptr getelementptr inbounds ([6 x i64], ptr @_QFEa, i64 0, i64 1), align 8, !tbaa !3
  %14 = add i64 %13, -1
  %15 = getelementptr [4 x i64], ptr @_QFEl, i64 0, i64 %14
  %16 = load i64, ptr %15, align 8, !tbaa !3
  %17 = add i64 %16, 1
  store i64 %17, ptr %15, align 8, !tbaa !3
  %18 = load i64, ptr getelementptr inbounds ([6 x i64], ptr @_QFEa, i64 0, i64 2), align 16, !tbaa !3
  %19 = add i64 %18, -1
  %20 = getelementptr [4 x i64], ptr @_QFEl, i64 0, i64 %19
  %21 = load i64, ptr %20, align 8, !tbaa !3
  %22 = add i64 %21, 1
  store i64 %22, ptr %20, align 8, !tbaa !3
  %23 = load i64, ptr getelementptr inbounds ([6 x i64], ptr @_QFEa, i64 0, i64 3), align 8, !tbaa !3
  %24 = add i64 %23, -1
  %25 = getelementptr [4 x i64], ptr @_QFEl, i64 0, i64 %24
  %26 = load i64, ptr %25, align 8, !tbaa !3
  %27 = add i64 %26, 1
  store i64 %27, ptr %25, align 8, !tbaa !3
  %28 = load i64, ptr getelementptr inbounds ([6 x i64], ptr @_QFEa, i64 0, i64 4), align 16, !tbaa !3
  %29 = add i64 %28, -1
  %30 = getelementptr [4 x i64], ptr @_QFEl, i64 0, i64 %29
  %31 = load i64, ptr %30, align 8, !tbaa !3
  %32 = add i64 %31, 1
  store i64 %32, ptr %30, align 8, !tbaa !3
  %33 = load i64, ptr getelementptr inbounds ([6 x i64], ptr @_QFEa, i64 0, i64 5), align 8, !tbaa !3
  %34 = add i64 %33, -1
  %35 = getelementptr [4 x i64], ptr @_QFEl, i64 0, i64 %34
  %36 = load i64, ptr %35, align 8, !tbaa !3
  %37 = add i64 %36, 1
  store i64 %37, ptr %35, align 8, !tbaa !3
  %38 = load i64, ptr @_QFEl, align 16, !tbaa !3
  %39 = icmp sgt i64 %38, 2
  br i1 %39, label %40, label %.preheader.1

40:                                               ; preds = %.preheader.preheader
  store i1 true, ptr @_QFEflg, align 1
  br label %.preheader.1

.preheader.1:                                     ; preds = %40, %.preheader.preheader
  %41 = load i64, ptr getelementptr inbounds ([4 x i64], ptr @_QFEl, i64 0, i64 1), align 8, !tbaa !3
  %42 = icmp sgt i64 %41, 2
  br i1 %42, label %43, label %.preheader.2

43:                                               ; preds = %.preheader.1
  store i1 true, ptr @_QFEflg, align 1
  br label %.preheader.2

.preheader.2:                                     ; preds = %43, %.preheader.1
  %44 = load i64, ptr getelementptr inbounds ([4 x i64], ptr @_QFEl, i64 0, i64 2), align 16, !tbaa !3
  %45 = icmp sgt i64 %44, 2
  br i1 %45, label %46, label %.preheader.3

46:                                               ; preds = %.preheader.2
  store i1 true, ptr @_QFEflg, align 1
  br label %.preheader.3

.preheader.3:                                     ; preds = %46, %.preheader.2
  %47 = load i64, ptr getelementptr inbounds ([4 x i64], ptr @_QFEl, i64 0, i64 3), align 8, !tbaa !3
  %48 = icmp sgt i64 %47, 2
  br i1 %48, label %49, label %.preheader.4

49:                                               ; preds = %.preheader.3
  store i1 true, ptr @_QFEflg, align 1
  br label %.preheader.4

.preheader.4:                                     ; preds = %49, %.preheader.3
  %50 = load i64, ptr getelementptr inbounds ([4 x i64], ptr @_QFEl, i64 1, i64 0), align 16, !tbaa !3
  %51 = icmp sgt i64 %50, 2
  br i1 %51, label %52, label %.preheader.5

52:                                               ; preds = %.preheader.4
  store i1 true, ptr @_QFEflg, align 1
  br label %.preheader.5

.preheader.5:                                     ; preds = %52, %.preheader.4
  %53 = load i64, ptr getelementptr ([4 x i64], ptr @_QFEl, i64 1, i64 1), align 8, !tbaa !3
  %54 = icmp sgt i64 %53, 2
  br i1 %54, label %.thread, label %55

.thread:                                          ; preds = %.preheader.5
  store i1 true, ptr @_QFEflg, align 1
  br label %56

55:                                               ; preds = %.preheader.5
  %.b.pre = load i1, ptr @_QFEflg, align 1
  br i1 %.b.pre, label %56, label %59

56:                                               ; preds = %.thread, %55
  %57 = tail call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.284129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.1899a3eee36ac64e3e3606de589c589e, i32 18)
  %58 = tail call i1 @_FortranAioOutputAscii(ptr %57, ptr nonnull @_QQcl.4E4F, i64 2)
  br label %62

59:                                               ; preds = %55
  %60 = tail call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.284129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.1899a3eee36ac64e3e3606de589c589e, i32 20)
  %61 = tail call i1 @_FortranAioOutputAscii(ptr %60, ptr nonnull @_QQcl.594553, i64 3)
  br label %62

62:                                               ; preds = %56, %59
  %.sink = phi ptr [ %57, %56 ], [ %60, %59 ]
  %63 = tail 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

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