Buggy python submission (verdict: Runtime Error):
a=int(input())
if int(a[0])==0 and a[1]==0:
  print('NA')
elif int(a[2])==0 and a[3]==0:
  print('NA')
elif int(a[0])>=2:
  print ('YYMM')
elif int(a[0])>=1 and a[1]>=3:
  print('YYMM')
elif int(a[2])>=2:
  print ('MMYY')
elif int(a[2])>=1 and a[3]>=3:
  print('MMYY')


Fixed submission:
S=input()
ab=int(S[0]+S[1])
cd=int(S[2]+S[3])
if ab==0:
  if cd==0:#0000
    print('NA')
  elif cd>=1 and cd<=12:
    #0001~0012
    print('YYMM')
  else: #0013~0099
    print('NA')
elif ab>=1 and ab<=12:
  if cd ==0:
    print('MMYY')
  elif cd>=1 and cd<=12:
    print('AMBIGUOUS')
  else:
    print('MMYY')
else:
  if cd>=1 and cd<=12:
    print('YYMM')
  else:
    print("NA")

Buggy python submission (verdict: Runtime Error):
a=int(input())
if a[0]==0 and a[1]==0:
  print('NA')
elif a[2]==0 and a[3]==0:
  print('NA')
elif a[0]>=2:
  print ('YYMM')
elif a[0]>=1 and a[1]>=3:
  print('YYMM')
elif a[2]>=2:
  print ('MMYY')
elif a[2]>=1 and a[3]>=3:
  print('MMYY')


Fixed submission:
S=input()
ab=int(S[0]+S[1])
cd=int(S[2]+S[3])
if ab==0:
  if cd==0:#0000
    print('NA')
  elif cd>=1 and cd<=12:
    #0001~0012
    print('YYMM')
  else: #0013~0099
    print('NA')
elif ab>=1 and ab<=12:
  if cd ==0:
    print('MMYY')
  elif cd>=1 and cd<=12:
    print('AMBIGUOUS')
  else:
    print('MMYY')
else:
  if cd>=1 and cd<=12:
    print('YYMM')
  else:
    print("NA")

Buggy python submission (verdict: Runtime Error):
a=int(input())
if a[0]==0 and a[1]==0:
  print('NA')
elif a[2]==0 and a[3]==0:
  print('NA')
elif a[0]>=2:
  print ('YYMM')
elif a[0]>=1 and a[1]>=3:
  print('YYMM')
elif a[2]>=2:
  print ('MMYY')
elif a[2]>=1 and a[3]>=3:
  print('MMYY')


Fixed submission:
S=input()
ab=int(S[0]+S[1])
cd=int(S[2]+S[3])
if ab==0:
  if cd==0:#0000
    print('NA')
  elif cd>=1 and cd<=12:
    #0001~0012
    print('YYMM')
  else: #0013~0099
    print('NA')
elif ab>=1 and ab<=12:
  if cd ==0:
    print('MMYY')
  elif cd>=1 and cd<=12:
    print('AMBIGUOUS')
  else:
    print('MMYY')
else:
  if cd>=1 and cd<=12:
    print('YYMM')
  else:
    print("NA")

Buggy python submission (verdict: Runtime Error):
a=int(input())
if a[0]==0 and a[1]==0:
  print('NA')
elif a[2]==0 and a[3]==0:
  print('NA')
elif a[0]>=2:
  print ('YYMM')
elif a[0]>=1 and a[1]>=3:
  print('YYMM')
elif a[2]>=2:
  print ('MMYY')
elif a[2]>=1 and a[3]>=3:
  print('MMYY')


Fixed submission:
S=input()
ab=int(S[0]+S[1])
cd=int(S[2]+S[3])
if ab==0:
  if cd==0:#0000
    print('NA')
  elif cd>=1 and cd<=12:
    #0001~0012
    print('YYMM')
  else: #0013~0099
    print('NA')
elif ab>=1 and ab<=12:
  if cd ==0:
    print('MMYY')
  elif cd>=1 and cd<=12:
    print('AMBIGUOUS')
  else:
    print('MMYY')
else:
  if cd>=1 and cd<=12:
    print('YYMM')
  else:
    print("NA")

Buggy python submission (verdict: Runtime Error):
a=input()
if a[0]==0 and a[1]==0:
  print('NA')
elif a[2]==0 and a[3]==0:
  print('NA')
elif a[0]>=2:
  print ('YYMM')
elif a[0]>=1 and a[1]>=3:
  print('YYMM')
elif a[2]>=2:
  print ('MMYY')
elif a[2]>=1 and a[3]>=3:
  print('MMYY')

Fixed submission:
S=input()
ab=int(S[0]+S[1])
cd=int(S[2]+S[3])
if ab==0:
  if cd==0:#0000
    print('NA')
  elif cd>=1 and cd<=12:
    #0001~0012
    print('YYMM')
  else: #0013~0099
    print('NA')
elif ab>=1 and ab<=12:
  if cd ==0:
    print('MMYY')
  elif cd>=1 and cd<=12:
    print('AMBIGUOUS')
  else:
    print('MMYY')
else:
  if cd>=1 and cd<=12:
    print('YYMM')
  else:
    print("NA")