qyliang/CodeNanoFix huggingface dataset:
Buggy code:
from collections import Counter 
from collections import defaultdict
from collections import deque
import math
import itertools
import heapq
import sys
sys.setrecursionlimit(10**6)

#n=int(input())
#n,m=list(map(int,input().split()))
#a=list(map(int,input().split()))
input_list = lambda : list(map(int,input().split()))

s=input()
p_a=int(s[:2])
p_b=int(s[2:])
yymm=(0<p_b<12)
mmyy=(0<p_a<12)

if yymm and mmyy:
    print("AMBIGUOUS")
    exit()

if yymm:
    print("YYMM")
    exit()
if mmyy:
    print("MMYY")
    exit()

print("NA")

Fixed code:
from collections import Counter 
from collections import defaultdict
from collections import deque
import math
import itertools
import heapq
import sys
sys.setrecursionlimit(10**6)

#n=int(input())
#n,m=list(map(int,input().split()))
#a=list(map(int,input().split()))
input_list = lambda : list(map(int,input().split()))

s=input()
p_a=int(s[:2])
p_b=int(s[2:])
yymm=(0<p_b<13)
mmyy=(0<p_a<13)


if yymm and mmyy:
    print("AMBIGUOUS")
    exit()

if yymm:
    print("YYMM")
    exit()
if mmyy:
    print("MMYY")
    exit()

print("NA")
Buggy code:
s=int(input())
a=s//100
b=s-a
if a<13 and b<13 and a>0 and b>0:
    print("AMBIGUOUS")
elif a<13 and a>0:
    print("MMYY")
elif b<13 and b>0:
    print("YYMM")
else:
    print("NA")

Fixed code:
s=int(input())
a=s//100
b=s-a*100
if a<13 and b<13 and a>0 and b>0:
    print("AMBIGUOUS")
elif a<13 and a>0:
    print("MMYY")
elif b<13 and b>0:
    print("YYMM")
else:
    print("NA")
Buggy code:
s = input()

if int(s[:2]) >= 13 or s[:2] == '00' and int(s[2:4]) >= 13 or s[2:4] == '00':
    print('NA')
elif int(s[:2]) <= 12 and int(s[2:4]) <= 12:
    print('AMBIGUOUS')
elif int(s[:2]) <= 12:
    print('MMYY')
elif int(s[:2]) >= 13:
    print('YYMM')
    


Fixed code:
s = input()
if (int(s[:2]) >= 13 or s[:2] == '00') and (int(s[2:4]) >= 13 or s[2:4] == '00'):
    print('NA')
elif 0 < int(s[:2]) <= 12 and 0 < int(s[2:4]) <= 12:
    print('AMBIGUOUS')
elif 0 < int(s[:2]) <= 12:
    print('MMYY')
else:
    print('YYMM')
Buggy code:
S = input()
a = int(S[0:2])
b = int(S[2:4])
LIST = [False,False]

print(a,b)
if 1 <= b <= 12 and a > 0:#YYMM
    LIST[0] = True 
if 1 <= a <= 12 and b > 0:#MMYY
    LIST[1] = True 

if LIST[0] and LIST[1]:
    print("AMBIGUOUS")
elif LIST[0] and not LIST[1]:
    print("YYMM")
elif not LIST[0] and LIST[1]:
    print("MMYY")
else:
    print("NA")

Fixed code:
S = input()
a = int(S[0:2])
b = int(S[2:4])
LIST = [False,False]

if 1 <= b <= 12 and a >= 0:#YYMM
    LIST[0] = True 
if 1 <= a <= 12 and b >= 0:#MMYY
    LIST[1] = True 

if LIST[0] and LIST[1]:
    print("AMBIGUOUS")
elif LIST[0] and not LIST[1]:
    print("YYMM")
elif not LIST[0] and LIST[1]:
    print("MMYY")
else:
    print("NA")
Buggy code:
s = list(input())
ab = int(s[0]+s[1])
cd = int(s[2]+s[3])
ans = ""
if 1 <= ab <= 12 and (cd == 0 or 13 <= cd):
    ans = "MMYY"
elif 1 <= cd <= 12 and (ab == 0 or 13 <= ab):
    ans = "YYNN"
elif 1 <= ab <= 12 and 1 <= cd <= 12:
    ans = "AMBIGUOUS"
else:
    ans = "NA"
print(ans)


Fixed code:
s = list(input())
ab = int(s[0]+s[1])
cd = int(s[2]+s[3])
ans = ""
if 1 <= ab <= 12 and (cd == 0 or 13 <= cd):
    ans = "MMYY"
elif 1 <= cd <= 12 and (ab == 0 or 13 <= ab):
    ans = "YYMM"
elif 1 <= ab <= 12 and 1 <= cd <= 12:
    ans = "AMBIGUOUS"
else:
    ans = "NA"
print(ans)
Buggy code:
S = input()

Y = int(S[:2])
M = int(S[2:])

if(Y <= 12 and M <= 12):
    print('AMBIGUOUS')
elif(Y <= 12):
    print('MMYY')
elif(M <= 12):
    print('YYMM')
else:
    print('NA')


Fixed code:
S = input()

Y = int(S[:2])
M = int(S[2:])

if(Y <= 12 and M <= 12 and Y > 0 and M > 0):
    print('AMBIGUOUS')
elif(Y <= 12 and Y > 0):
    print('MMYY')
elif(M <= 12 and M > 0):
    print('YYMM')
else:
    print('NA')
Buggy code:
import sys


def input():
    return sys.stdin.readline()[:-1]


# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}
# b = list(map(lambda x: math.ceil(x/10)*10, a))

s = int(input())
YY = s // 100
MM = s % 100
print(YY, MM)
if 1 <= YY <= 12 and 1 <= MM <= 12 or 1 <= YY <= 12 and 1 <= MM <= 12:
    print("AMBIGUOUS")
elif 0 < MM <= 12:
    print("YYMM")
elif 0 < YY <= 12:
    print("MMYY")
else:
    print("NA")

Fixed code:
import sys


def input():
    return sys.stdin.readline()[:-1]


# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}
# b = list(map(lambda x: math.ceil(x/10)*10, a))

s = int(input())
YY = s // 100
MM = s % 100
if 1 <= YY <= 12 and 1 <= MM <= 12:
    print("AMBIGUOUS")
elif 0 < MM <= 12:
    print("YYMM")
elif 0 < YY <= 12:
    print("MMYY")
else:
    print("NA")
Buggy code:
# #!/usr/bin/env python3
# # -*- coding: utf-8 -*-


def main():
    S = input()

    first = int(S[:2])
    second = int(S[2:])

    if first < 10 or second < 0:
        print('NA')
    elif first > 12 and second <= 12:
        print('YYMM')
    elif first <= 12 and second > 12:
        print('MMYY')
    else:
        print('AMBIGUOUS')


if __name__ == "__main__":
    main()


Fixed code:
# #!/usr/bin/env python3
# # -*- coding: utf-8 -*-


def main():
    S = input()

    first = int(S[:2])
    second = int(S[2:])

    if 0 < first <= 12 and 0 < second <= 12:
        print('AMBIGUOUS')
    elif 0 < first <= 12:
        print('MMYY')
    elif 0 < second <= 12:
        print('YYMM')
    else:
        print('NA')


if __name__ == "__main__":
    main()
Buggy code:
X = input()

X1 = 10*int(X[0]) + int(X[1])
X2 = 10*int(X[2]) + int(X[3])

if X1 <= 12 and X2 > 12:
    print("MMYY")
elif X1 > 12 and X2 <= 12:
    print("YYMM")
elif X1 > 12 and X2 > 12:
    print("NA")
else:
    print("AMBIGUOUS")

Fixed code:
X = input()

X1 = 10*int(X[0]) + int(X[1])
X2 = 10*int(X[2]) + int(X[3])
if (1 <= X1 <= 12) and ((X2 > 12) or (X2 == 0)):
    print("MMYY")
elif ((X1 > 12) or (X1 == 0)) and (1 <= X2 <= 12):
    print("YYMM")
elif (1 <= X1 <= 12) and (1 <= X2 <= 12):
    print("AMBIGUOUS")
else:
    print("NA")
Buggy code:
s = input()
#print(s)
m1 = False
m2 = False

s1 = int(s[0:2])
s2 = int(s[2:])
#print(s1, s2)

if 0 < s1 < 13:
  m1 = True

if 0 < s2 < 13:
  m2 = True

if m1 == True and m2 == True:
  print('ANBIGUOUS')
elif m1 == True and m2 == False:
  print('MMYY')
elif m1 == False and m2 == True:
  print('YYMM')
elif m1 == False and m2 == False:
  print('NA')


Fixed code:
s = input()
#print(s)
m1 = False
m2 = False
 
s1 = int(s[0:2])
s2 = int(s[2:])
#print(s1, s2)
 
if 0 < s1 < 13:
  m1 = True
 
if 0 < s2 < 13:
  m2 = True
 
if m1 == True and m2 == True:
  print('AMBIGUOUS')
elif m1 == True and m2 == False:
  print('MMYY')
elif m1 == False and m2 == True:
  print('YYMM')
elif m1 == False and m2 == False:
  print('NA')
Buggy code:
s = int(input())
s1 = s//100
s2 = s%100

if 0<s1<13 and 0<s2<13:
  print('ANBIGUOUS')
elif 0<s1<13:
  print('MMYY')
elif 0<s2<13:
  print('YYMM')
else:
  print('NA')


Fixed code:
s = int(input())
s1 = s//100
s2 = s%100

if 0<s1<13 and 0<s2<13:
  print('AMBIGUOUS')
elif 0<s1<13:
  print('MMYY')
elif 0<s2<13:
  print('YYMM')
else:
  print('NA')
Buggy code:
S=list(input())
XXYY=[]
l=' '
for i in range(2):
    l+=S[i]
XXYY.append(int(l))
l=' '
for i in range(2,4):
    l+=S[i]
XXYY.append(int(l))
ans=[]
if XXYY[0]>31:
    ans.append("NA")
elif XXYY[0]<=31 and XXYY[0]>12:
    if XXYY[1]<=12 and XXYY[1]>0:
        ans.append("MMYY")
    else:
        ans.append("NA")
elif XXYY[0]<=12 and XXYY[0]>0:
    if XXYY[1]<=31 and XXYY[1]>12:
        ans.append("YYMM")
    elif XXYY[1]<=12 and XXYY[1]>0:
        ans.append("AMBIGUOUS")
    else:
        ans.append("NA")
else:
     ans.append("NA")
print(ans[0])

Fixed code:
S=list(input())
XXYY=[]
l=' '
for i in range(2):
    l+=S[i]
XXYY.append(int(l))
l=' '
for i in range(2,4):
    l+=S[i]
XXYY.append(int(l))

ans=[]
if XXYY[0]>12:
    if XXYY[1]<=12 and XXYY[1]>0:
        ans.append("YYMM")
    else:
        ans.append("NA")
elif XXYY[0]<=12 and XXYY[0]>0:
    if XXYY[1]>12:
        ans.append("MMYY")
    elif XXYY[1]<=12 and XXYY[1]>0:
        ans.append("AMBIGUOUS")
    else:
        ans.append("MMYY")
else:
    if XXYY[1]<=12 and XXYY[1]>0:
        ans.append("YYMM")
    else:
        ans.append("NA")
print(ans[0])
Buggy code:
S =input()
A = S[:2]
B = S[2:]
A_right = 0
B_right = 0
if int(A) > 1 and int(A) < 13:
  A_right = 1
if int(B) > 1 and int(B) < 13:
  B_right = 1
if A_right == 0 and B_right == 0:
  print('NA')
elif A_right == 1 and B_right == 0:
  print('MMYY')
elif A_right == 0 and B_right == 1:
  print('YYMM')
elif A_right == 1 and B_right == 1:
  print('AMBIGUOUS')

Fixed code:
S =input()
A = S[:2]
B = S[2:]
A_right = 0
B_right = 0
if int(A) > 0 and int(A) < 13:
  A_right = 1
if int(B) > 0 and int(B) < 13:
  B_right = 1
if A_right == 0 and B_right == 0:
  print('NA')
elif A_right == 1 and B_right == 0:
  print('MMYY')
elif A_right == 0 and B_right == 1:
  print('YYMM')
elif A_right == 1 and B_right == 1:
  print('AMBIGUOUS')
Buggy code:
S = [i for i in input()]
mae = S[0]+S[1]
ushiro = S[2]+S[3]
mmyy = False
yymm = False
if int(mae)>0 and int(mae)<=12:
    mmyy = True
elif int(ushiro)>0 and int(ushiro)<=12:
    yymm = True

if mmyy and yymm:
    print("AMBIGUOUS")
elif mmyy and yymm==False:
    print("MMYY")
elif mmyy==False and yymm==False:
    print("YYMM")
else:
    print("NA")

Fixed code:
S = [i for i in input()]
mae = S[0]+S[1]
ushiro = S[2]+S[3]
mmyy = True if int(mae)>0 and int(mae)<=12 else False
yymm = True if int(ushiro)>0 and int(ushiro)<=12 else False

if mmyy==True and yymm==True:
    print("AMBIGUOUS")
elif mmyy==True and yymm==False:
    print("MMYY")
elif mmyy==False and yymm==True:
    print("YYMM")
else:
    print("NA")
Buggy code:
def canMonth(value):
    return 1 <= value and value <= 12


S = input()

F = int(S[:2])
B = int(S[2:])
fm = canMonth(F)
bm = canMonth(B)

if fm and bm:
    print('ANBIGUOUS')
elif not fm and not bm:
    print('NA')
elif fm:
    print('MMYY')
else:
    print('YYMM')


Fixed code:
def canMonth(value):
    return 1 <= value and value <= 12


S = input()

F = int(S[:2])
B = int(S[2:])
fm = canMonth(F)
bm = canMonth(B)

if fm and bm:
    print('AMBIGUOUS')
elif not fm and not bm:
    print('NA')
elif fm:
    print('MMYY')
else:
    print('YYMM')
Buggy code:
s = input()
a = s[:2]
b = s[2:]
b1 = 0
a1 = 0

if b[0] == '0': b1 = int(b[1])
else: b1 = int(b)
if a[0] == '0': a1 = int(a[1])
else: a1 = int(a)

if (b1>=1 and b1<=12) and (a1>=1 and a1<=12): print("AMBIGUOS")
elif b1>=1 and b1<=12: print("YYMM")
elif a1>=1 and a1<=12: print("MMYY")
else: print("NA") 

Fixed code:
s = input()
a = s[:2]
b = s[2:]
b1 = 0
a1 = 0

if b[0] == '0': b1 = int(b[1])
else: b1 = int(b)
if a[0] == '0': a1 = int(a[1])
else: a1 = int(a)

if (b1>=1 and b1<=12) and (a1>=1 and a1<=12): print("AMBIGUOUS")
elif b1>=1 and b1<=12: print("YYMM")
elif a1>=1 and a1<=12: print("MMYY")
else: print("NA")
Buggy code:
S=input()
if S[0]=='0':
    if S[2]=='0':
        print('AMBIGUOUS')
    elif S[2]=='1' and (S[3]=='0' or S[3]=='1' or S[3]=='2'):
        print('AMBIGIOUS')
    else:
        print('MMYY')
elif S[0]=='1' and(S[1]=='0' or S[1]=='1' or S[2]=='2'):
    if S[2]=='0':
        print('AMBIGUOUS')
    elif S[2]=='1' and (S[3]=='0' or S[3]=='1' or S[3]=='2'):
        print('AMBIGIOUS')
    else:
        print('MMYY')

else:
    if S[2]=='0':
        print('YYMM')
    elif S[2]=='1' and (S[3]=='0' or S[3]=='1' or S[3]=='2'):
        print('YYMM')
    else:
        print('NA')

Fixed code:
S=input()
if S[0]=='0' and S[1]!='0':
    if S[2]=='0' and S[3]!='0':
        print('AMBIGUOUS')
    elif S[2]=='1' and (S[3]=='0' or S[3]=='1' or S[3]=='2'):
        print('AMBIGUOUS')
    else:
        print('MMYY')
elif S[0]=='1' and(S[1]=='0' or S[1]=='1' or S[1]=='2'):
    if S[2]=='0' and S[3]!='0':
        print('AMBIGUOUS')
    elif S[2]=='1' and (S[3]=='0' or S[3]=='1' or S[3]=='2'):
        print('AMBIGUOUS')
    else:
        print('MMYY')
 
else:
    if S[2]=='0' and S[3]!='0':
        print('YYMM')
    elif S[2]=='1' and (S[3]=='0' or S[3]=='1' or S[3]=='2'):
        print('YYMM')
    else:
        print('NA')
Buggy code:
S=input()
S1=int(S[0]+S[1])
S2=int(S[2]+S[3])

if 1<=S1<=12:
    
    if S2==0:
        print("NA")
    
    if 1<=S2<=12:
        print('AMBIGUOUS')
        
    elif 12<=S2<=31:
        print('YYMM')

elif 12<S1<=31 and S2 !=0 :
    print("MMYY")

else:
    print('NA')    

Fixed code:
S=input()
S1=int(S[0]+S[1])
S2=int(S[2]+S[3])

if 1<=S1<=12 and 1<=S2<=12:
    print('AMBIGUOUS')

elif 1<=S1<=12 :
    print('MMYY')

elif 1<=S2<=12:
    print('YYMM')

else:
    print('NA')
Buggy code:
a = input()

if 0 < int(a[:2]) and int(a[:2]) <= 12:
    if 0 < int(a[2:]) and int(a[2:]) <= 12:
        print("AMBIGUOUSS")
    else:
        print("MMYY")

elif 0 < int(a[2:]) and int(a[2:]) <= 12:
    if 0 < int(a[:2]) and int(a[:2]) <= 12:
        print("AMBIGUOUSS")
    else:
        print("YYMM")
else:
    if 0 < int(a[:2]) and int(a[:2]) <= 12:
        print("MMYY")
    elif 0 < int(a[2:]) and int(a[2:]) <= 12:
        print("YYMM")
    else:
        print("NA")

Fixed code:
a = input()

if 0 < int(a[:2]) and int(a[:2]) <= 12:
    if 0 < int(a[2:]) and int(a[2:]) <= 12:
        print("AMBIGUOUS")
    else:
        print("MMYY")

elif 0 < int(a[2:]) and int(a[2:]) <= 12:
    if 0 < int(a[:2]) and int(a[:2]) <= 12:
        print("AMBIGUOUS")
    else:
        print("YYMM")
else:
    print("NA")
Buggy code:
S = input()

AA = S[:2]
BB = S[2:]
a = []
for i in range(1, 13):
    if 1 <= i <= 9:
        a.append('0' + str(i))
    else:
        a.append(str(i))
print(a)

if not AA in a and not BB in a:
    print('WA')
elif AA in a and BB in a:
    print('AMBIGUOUS')
elif AA in a:
    print('MMYY')
else:
    print('YYMM')

Fixed code:
S = input()

AA = S[:2]
BB = S[2:]
a = []
for i in range(1, 13):
    if 1 <= i <= 9:
        a.append('0' + str(i))
    else:
        a.append(str(i))
if not AA in a and not BB in a:
    print('NA')
elif AA in a and BB in a:
    print('AMBIGUOUS')
elif AA in a:
    print('MMYY')
else:
    print('YYMM')
Buggy code:
s=str(input())
if(int(s[:2])>12 and int(s[2:])<=12):
	print("YYMM")
elif(int(s[2:])>12 and int(s[:2])<=12):
	print("MMYY")
elif(int(s[2:])<=12 and int(s[:2])<=12):
	print("AMBIGUOUS")
else:
	print('NA')

Fixed code:
s=str(input())
if(int(s[:2])>12 and int(s[2:])<=12 and int(s[2:])>0):
	print("YYMM")
elif(int(s[2:])>12 and int(s[:2])<=12  and int(s[:2])>0):
	print("MMYY")
elif(int(s[2:])<=12 and int(s[:2])<=12 and int(s[2:])>0 and int(s[:2])==0):
	print("YYMM")
elif(int(s[2:])<=12 and int(s[:2])<=12 and int(s[2:])==0 and int(s[:2])>0):
	print("MMYY")
elif(int(s[2:])<=12 and int(s[:2])<=12 and int(s[2:])>0 and int(s[:2])>0):
	print("AMBIGUOUS")
else:
	print('NA')
Buggy code:
S = input()
F = int(S[:2])
L = int(S[2:])

if (F >= 13 and L >= 13) or (F == 0 and L == 0):
    print('NA')
elif F >= 13 or F == 0:
    print('YYMM')
elif L >= 13 or L == 0:
    print('MMYY')
else:
    print('AMBIGUOUS')

Fixed code:
S = input()
F = int(S[:2])
L = int(S[2:])

if (F >= 13 and L >= 13) or (F == 0 and L == 0) or (F >= 13 and L == 0) or (F == 0 and L >= 13):
    print('NA')
elif F >= 13 or F == 0:
    print('YYMM')
elif L >= 13 or L == 0:
    print('MMYY')
else:
    print('AMBIGUOUS')
Buggy code:
hoge = str(input())
a = int(hoge[:2])
b = int(hoge[2:4])

if a == 0 or b == 0:
  result = "NA"

if 0 < a and a < 12:
  result = "YYMM"
  if 0 < a and a < 12:
    result = "AMBIGUOUS"
if 0 < b and b < 12:
  result = "MMYY"
  if 0 < a and a < 12:
    result = "AMBIGUOUS"

print(result)

Fixed code:
hoge = str(input())
a = int(hoge[:2])
b = int(hoge[2:4])
result = None

if 0 < a and a <= 12:
  result = "MMYY"
  if 0 < b and b <= 12:
    result = "AMBIGUOUS"
if 0 < b and b <= 12:
  result = "YYMM"
  if 0 < a and a <= 12:
    result = "AMBIGUOUS"
if result == None:
  result = "NA"

print(result)
Buggy code:
S= input()
F = S[:2]
B = S[2:]

F_m = 0<int(F)<13
F_y = 0<=int(F)<100
B_m = 0<int(B)<13
B_y = 0<=int(B)<100
YM = F_y + B_m
MY = B_y + F_m
if YM==2 & MY==2:
    print("AMBIGUOUS")
if YM==2:
    print('YM')
elif MY==2:
    print('MY')
else:
    print('NA')

Fixed code:
S=input()
F = S[:2]
B = S[2:]
 
F_m = 0<int(F)<13
F_y = 0<=int(F)<100
B_m = 0<int(B)<13
B_y = 0<=int(B)<100
YM = F_y + B_m
MY = B_y + F_m
if YM==2 & MY==2:
    print("AMBIGUOUS")
elif YM==2:
    print('YYMM')
elif MY==2:
    print('MMYY')
else:
    print('NA')
Buggy code:
S = input()
a = S[0:2]
b = S[2:4]
print(a)
print(b)


def mm(s):
    if int(s) <= 12 and 1 <= int(s):
        return True
    return False


if mm(a) and mm(b):
    print('AMBIGUOUS')
elif mm(a):
    print('MMYY')
elif mm(b):
    print('YYMM')
else:
    print('NA')


Fixed code:
S = input()
a = S[0:2]
b = S[2:4]


def mm(s):
    if int(s) <= 12 and 1 <= int(s):
        return True
    return False


if mm(a) and mm(b):
    print('AMBIGUOUS')
elif mm(a):
    print('MMYY')
elif mm(b):
    print('YYMM')
else:
    print('NA')
Buggy code:
s = input()
l = s[:2]
r = s[2:]

if(int(l) <=12 and int(r) <= 12):
    print('AMBIGUOUS')
else :
    if(int(l) <= 12):
        print('MMYY')
    else:
        if(int(r) <= 12):
            print('YYMM')
        else:
            print('NA')
            

Fixed code:
s = input()
l = s[:2]
r = s[2:]

if(int(l) >= 1 and int(l) <=12 and int(r) <= 12 and int(r) >= 1):
    print('AMBIGUOUS')
else :
    if(int(l) <= 12 and int(l) >= 1):
        print('MMYY')
    else:
        if(int(r) <= 12 and int(r) >= 1):
            print('YYMM')
        else:
            print('NA')
Buggy code:
s = str(input())
ans = ['YYMM','MMYY','AMBIGUOUS','NA']
#print(s[:2],s[-2:])
if (0==int(s[:2]) or 13<=int(s[:2])) and (0==int(s[-2:]) or 13<=int(s[-2:])):
    print(ans[4])
if 0<int(s[:2])<=12 and 0<int(s[-2:])<=12:
    print(ans[3])
elif 0<int(s[:2])<=12:
    print(ans[2])
elif 0<int(s[-2:])<=12:
    print(ans[1])

    

Fixed code:
s = str(input())
ans = ['YYMM','MMYY','AMBIGUOUS','NA']
#print(s[:2],s[-2:])
if (0==int(s[:2]) or 13<=int(s[:2])) and (0==int(s[-2:]) or 13<=int(s[-2:])):
    print(ans[3])
if 0<int(s[:2])<=12 and 0<int(s[-2:])<=12:
    print(ans[2])
elif 0<int(s[:2])<=12:
    print(ans[1])
elif 0<int(s[-2:])<=12:
    print(ans[0])
Buggy code:
s = list(input())
YYMM = False
MMYY = False

if s[2] == '1':
    if s[3] == '0' | s[3] == '1' | s[3] == '2':
        YYMM = True
if s[2] == '0':
    YYMM = True

if s[0] == 1:
    if s[1] == '0' | s[1] == '1' | s[1] == '2':
        MMYY = True
if s[0] == '0':
    MMYY = True

if YYMM & MMYY:
    print("AMBIGUOUS")
elif YYMM:
    print("YYMM")
elif MMYY:
    print("MMYY")
else:
    print("NA")

Fixed code:
s = list(input())
YYMM = False
MMYY = False
 
if s[2] == '1':
    if (s[3] == '0') | (s[3] == '1') | (s[3] == '2'):
        YYMM = True
elif s[2] == '0':
    if s[3] != '0':
        YYMM = True
 
if s[0] == '1':
    if (s[1] == '0') | (s[1] == '1') | (s[1] == '2'):
        MMYY = True
elif s[0] == '0':
    if s[1] != '0':
        MMYY = True
 
if YYMM & MMYY:
    print("AMBIGUOUS")
elif YYMM:
    print("YYMM")
elif MMYY:
    print("MMYY")
else:
    print("NA")
Buggy code:
def yymm():
    num = input()
    former = num[:2]
    latter = num[2:]

    former = int(former)
    latter = int(latter)
    print(former)
    print(latter)

    if 1 <= former <= 12 and 1<= latter <= 12:
        print('AMBIGUOUS')
    elif 1 <= former <= 12:
        print('MMYY')
    elif 1 <= latter <= 12:
        print('YYMM')
    else:
        print('NA')

if __name__ == '__main__':
    yymm()

Fixed code:
def yymm():
    num = input()
    former = num[:2]
    latter = num[2:]

    former = int(former)
    latter = int(latter)
    # print(former)
    # print(latter)

    if 1 <= former <= 12 and 1<= latter <= 12:
        print('AMBIGUOUS')
    elif 1 <= former <= 12:
        print('MMYY')
    elif 1 <= latter <= 12:
        print('YYMM')
    else:
        print('NA')

if __name__ == '__main__':
    yymm()
Buggy code:
x = int(input())
a = x // 1000117
b = x % 100

a_is_month = 0 < a & a <= 12
b_is_month = 0 < b & b <= 12

if a_is_month:
    if b_is_month:
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if b_is_month:
        print("YYMM")
    else:
        print("NA")


Fixed code:
x = int(input())
a = x // 100
b = x % 100

a_is_month = 0 < a & a <= 12
b_is_month = 0 < b & b <= 12

if a_is_month:
    if b_is_month:
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if b_is_month:
        print("YYMM")
    else:
        print("NA")
Buggy code:
s = input()
if int(s[:2]) > 12 and int(s[2:]) > 12:
  print("NA")
  exit()
elif int(s[:2]) <= 12 and int(s[2:]) <= 12:
  print("AMBIGUOUS")
  exit()
elif int(s[:2]) <= 12:
  print("MMYY")
  exit()
elif int(s[2:]) <= 12:
  print("YYMM")
  exit()

Fixed code:
s = input()
if s[:2] == "00" and s[2:] == "00":
  print("NA")
  exit()
elif s[:2] == "00" and int(s[2:]) > 12:
  print("NA")
  exit()
elif s[:2] == "00" and int(s[2:]) <= 12:
  print("YYMM")
  exit()
elif int(s[:2]) > 12 and s[2:] == "00":
  print("NA")
  exit()
elif int(s[:2]) <= 12 and s[2:] == "00":
  print("MMYY")
  exit()
if int(s[:2]) > 12 and int(s[2:]) > 12:
  print("NA")
  exit()
elif int(s[:2]) <= 12 and int(s[2:]) <= 12:
  print("AMBIGUOUS")
  exit()
elif int(s[:2]) <= 12:
  print("MMYY")
  exit()
elif int(s[2:]) <= 12:
  print("YYMM")
  exit()
Buggy code:
S = input()

a = int(S[:2])
b = int(S[2:])


if a == 0 or b == 0:
	print("NA")
if a > 12:
	if b > 12:
		print("NA")
	else:
		print("YYMM")
if a <= 12:
	if b > 12:
		print("MMYY")
	else:
		print("AMBIGUOUS") 

Fixed code:
S = input()
a = int(S[:2])
b = int(S[2:])

if a > 12:
	if b > 12:
		print("NA")
	elif b > 0:
		print("YYMM")
	else:
		print("NA")

if 0 < a <= 12:
	if b > 12 or b == 0:
		print("MMYY")
	else:
		print("AMBIGUOUS") 

if a == 0:
	if b > 12:
		print("NA")
	elif 0 < b <= 12:
		print("YYMM")
	else:
		print("NA")
Buggy code:
S = input()

yymm = 0
mmyy = 0

kami2 = int(S[0]) * 10 + int(S[1])
simo2 = int(S[2]) * 10 + int(S[3])


if simo2 > 0 and simo2 <= 12:
    yymm=1
elif kami2 <= 12 and kami2 >0:
    mmyy=1


if yymm:

 if yymm:
    print("AMBIGUOUS")
 else:
     print("YYMM")
           
elif mmyy:
     print("MMYY")
else:
    print("NA")

Fixed code:
S = input()

yymm = 0
mmyy = 0

kami2 = int(S[0]) * 10 + int(S[1])
simo2 = int(S[2]) * 10 + int(S[3])


if simo2 > 0 and simo2 <= 12:
    yymm=1
if kami2 <= 12 and kami2 >0:
    mmyy=1


if yymm:

 if mmyy:
    print("AMBIGUOUS")
 else:
     print("YYMM")
           
elif mmyy:
     print("MMYY")
else:
    print("NA")
Buggy code:
S = input()
S_1 = S[:2]
S_2 = S[2:]
if int(S_1)>=13:
    if int(S_2)>=13:print("NA")
    else:print("YYMM")
else:
    if int(S_2)>=13:print("MMYY")
    else:print("AMBIGUOUS")

Fixed code:
S = input()
S_1 = S[:2]
S_2 = S[2:]
if int(S_1)>=13 or int(S_1)==0:
    if int(S_2)>=13 or int(S_2)==0:print("NA")
    else:print("YYMM")
else:
    if int(S_2)>=13 or int(S_2)==0:print("MMYY")
    else:print("AMBIGUOUS")
Buggy code:
=input()
L=["01","02","03","04","05","06","07","08","09","10","11","12"]

if S[:2] in L:
    if S[2:] in L:
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if S[2:] in L:
        print("YYMM")
    else:
        print("NA")

Fixed code:
S=input()
L=["01","02","03","04","05","06","07","08","09","10","11","12"]

if S[:2] in L:
    if S[2:] in L:
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if S[2:] in L:
        print("YYMM")
    else:
        print("NA")
Buggy code:
import sys

s = input()
s = s[:4]
a = s[:2]
b = s[2:]

if (int(a) > 12 and int(b) > 12) or  int(b) == 0  or int(a) == 0:
	
	print("NA")
	sys.exit()
	
if int(a) <= 12 and int(b) <= 12:
	print("AMBIGUOUS")

	
if 32 > int(a) > 12 and int(b) <= 12:

	print("YYMM")
	sys.exit()

if int(a) <= 12 and 32 > int(b) > 12:

	print("MMYY")
	sys.exit()
print("NA")
		




Fixed code:
import sys

s = input()
s = s[:4]
a = s[:2]
b = s[2:]

	
if 0 <  int(a) <= 12 and 0 <  int(b) <= 12:

	print("AMBIGUOUS")
	sys.exit()


elif int(a) >= 0 and 0 < int(b) <= 12:

	print("YYMM")
	sys.exit()

elif 0 < int(a) <= 12 and int(b) >= 0:

	print("MMYY")
	sys.exit()

print("NA")