PROGRAM ATCODER

implicit none
integer :: s,c1=0,c2=0

read*, s

if ( mod(s,100) >= 1 .and. mod(s,100) <= 12  ) then
  c1 = 1
end if

if ( s/100 >= 1 .and. s/100 <= 12 ) then
  c2 = 1
end if

if ( c1 == 1 .and. c2 == 1 ) then
  print'(a)', 'AMBIGUOUS'
end if

if ( c1 == 1 .and. c2 == 0 ) then
  print'(a)', 'YYMM'
end if

if ( c1 == 0 .and. c2 == 1 ) then
  print'(a)', 'MMYY'
end if

if ( c1 == 0 .and. c2 == 0 ) then
  print'(a)', 'NA'
end if

END PROGRAM ATCODER
; 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"

@_QFEc1 = internal unnamed_addr global i1 false
@_QFEc2 = internal unnamed_addr global i1 false
@_QQcl.045a3526cd7c984c887cc5bd725aa4aa = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_4272/source.f\00"
@_QQcl.286129 = linkonce constant [3 x i8] c"(a)"
@_QQcl.414D424947554F5553 = linkonce constant [9 x i8] c"AMBIGUOUS"
@_QQcl.59594D4D = linkonce constant [4 x i8] c"YYMM"
@_QQcl.4D4D5959 = linkonce constant [4 x i8] c"MMYY"
@_QQcl.4E41 = linkonce constant [2 x i8] c"NA"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i32, align 4
  %2 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.045a3526cd7c984c887cc5bd725aa4aa, i32 6)
  %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 = srem i32 %5, 100
  %7 = add nsw i32 %6, -1
  %8 = icmp ult i32 %7, 12
  br i1 %8, label %9, label %10

9:                                                ; preds = %0
  store i1 true, ptr @_QFEc1, align 1
  br label %10

10:                                               ; preds = %9, %0
  %11 = add i32 %5, -100
  %12 = icmp ult i32 %11, 1200
  br i1 %12, label %13, label %._crit_edge

._crit_edge:                                      ; preds = %10
  %.b7.pre = load i1, ptr @_QFEc2, align 1
  br label %14

13:                                               ; preds = %10
  store i1 true, ptr @_QFEc2, align 1
  br label %14

14:                                               ; preds = %._crit_edge, %13
  %.b7 = phi i1 [ %.b7.pre, %._crit_edge ], [ true, %13 ]
  %.b3 = load i1, ptr @_QFEc1, align 1
  %15 = and i1 %.b3, %.b7
  br i1 %15, label %16, label %20

16:                                               ; preds = %14
  %17 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.045a3526cd7c984c887cc5bd725aa4aa, i32 17)
  %18 = call i1 @_FortranAioOutputAscii(ptr %17, ptr nonnull @_QQcl.414D424947554F5553, i64 9)
  %19 = call i32 @_FortranAioEndIoStatement(ptr %17)
  %.b2.pre = load i1, ptr @_QFEc1, align 1
  %.b6.pre = load i1, ptr @_QFEc2, align 1
  br label %20

20:                                               ; preds = %16, %14
  %.b6 = phi i1 [ %.b6.pre, %16 ], [ %.b7, %14 ]
  %.b2 = phi i1 [ %.b2.pre, %16 ], [ %.b3, %14 ]
  %21 = xor i1 %.b6, true
  %22 = and i1 %.b2, %21
  br i1 %22, label %23, label %27

23:                                               ; preds = %20
  %24 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.045a3526cd7c984c887cc5bd725aa4aa, i32 21)
  %25 = call i1 @_FortranAioOutputAscii(ptr %24, ptr nonnull @_QQcl.59594D4D, i64 4)
  %26 = call i32 @_FortranAioEndIoStatement(ptr %24)
  %.b1.pre = load i1, ptr @_QFEc1, align 1
  %.b5.pre = load i1, ptr @_QFEc2, align 1
  br label %27

27:                                               ; preds = %23, %20
  %.b5 = phi i1 [ %.b5.pre, %23 ], [ %.b6, %20 ]
  %.b1 = phi i1 [ %.b1.pre, %23 ], [ %.b2, %20 ]
  %28 = xor i1 %.b1, true
  %29 = and i1 %.b5, %28
  br i1 %29, label %30, label %34

30:                                               ; preds = %27
  %31 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.045a3526cd7c984c887cc5bd725aa4aa, i32 25)
  %32 = call i1 @_FortranAioOutputAscii(ptr %31, ptr nonnull @_QQcl.4D4D5959, i64 4)
  %33 = call i32 @_FortranAioEndIoStatement(ptr %31)
  %.b.pre = load i1, ptr @_QFEc1, align 1
  %.b4.pre = load i1, ptr @_QFEc2, align 1
  br label %34

34:                                               ; preds = %30, %27
  %.b4 = phi i1 [ %.b4.pre, %30 ], [ %.b5, %27 ]
  %.b = phi i1 [ %.b.pre, %30 ], [ %.b1, %27 ]
  %.demorgan = or i1 %.b, %.b4
  br i1 %.demorgan, label %39, label %35

35:                                               ; preds = %34
  %36 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.286129, i64 3, ptr null, i32 -1, ptr nonnull @_QQcl.045a3526cd7c984c887cc5bd725aa4aa, i32 29)
  %37 = call i1 @_FortranAioOutputAscii(ptr %36, ptr nonnull @_QQcl.4E41, i64 2)
  %38 = call i32 @_FortranAioEndIoStatement(ptr %36)
  br label %39

39:                                               ; preds = %35, %34
  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"}
