qyliang/CodeNanoFix huggingface dataset:
Buggy code:
s = input()
a = int(s[:2])
b = int(s[2:])

if 1 <= a and a <= 12 and 1 <= b and b <=12:
    print("AMBIGUOUS")
elif 1 <= a <=　12 and (12 < b or b < 1):
    print("MMYY")
elif (12 < a or a < 1) and 1 <= b <= 12:
    print("YYMM")
else:
    print("NA")

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

if 1 <= a and a <= 12 and 1 <= b and b <=12:
    print("AMBIGUOUS")
elif 1 <= a <=12 and (12 < b or b < 1):
    print("MMYY")
elif (12 < a or a < 1) and 1 <= b <= 12:
    print("YYMM")
else:
    print("NA")
Buggy code:
S = str(input())
year = S[0] + S[1]
month = S[2] + S[3]
if (int(year) > 12 and int(month) >12) or (int(year) == 0) or (int(month) == 0):
    print('NA')
elif int(year) > 12:
    print('MMYY')
elif int(month) >12:
    print('YYMM')
elif int(year) <= 12 and int(month) <= 12:
    print('AMBIGUOUS')

Fixed code:
S = str(input())
year = int(S[0] + S[1])
month = int(S[2] + S[3])
if year <= 12 and year >= 1 and month >= 1 and month <= 12:
    print('AMBIGUOUS')
elif year >= 0 and year <= 99 and month >= 1 and month <= 12:
    print('YYMM')
elif year >= 1 and year <= 12 and month >= 0 and month <= 99:
    print('MMYY')
else:
    print('NA')
Buggy code:
s = input()
a = int(s[:2])
b = int(s[2:])
if 1 <= a <= 12:
    if 1 <= b <= 12:
        print("AMBIGUROUS")
    else:
        print("MMYY")
elif 1 <= b <= 12:
    print("YYMM")
else:
    print("NA")


Fixed code:
s = input()
a = int(s[:2])
b = int(s[2:])
if 1 <= a <= 12:
    if 1 <= b <= 12:
        print("AMBIGUOUS")
    else:
        print("MMYY")
elif 1 <= b <= 12:
    print("YYMM")
else:
    print("NA")
Buggy code:
s = input()
yymm = False
mmyy = False
first = int(s[:2])
last = int(s[2:])
if first<=12 and first >0:
  mmyy = True
if last <=12 and last>0:
  yymm = True
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')

Fixed code:
s = input()
yymm = False
mmyy = False
first = int(s[:2])
last = int(s[2:])
if first<=12 and first >0:
    mmyy = True
if last <=12 and last>0:
    yymm = True
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:
ls=list(input())
first=[ls[0],ls[1]]
second=[ls[2],ls[3]]

if ls[0]=="0":
    del first[0]
if ls[2]=="0":
    del second[0]

a=int("".join(first))
b=int("".join(second))

def can_be_month(n):
    if n>=1 and n<=12:
        return True
    else:
        return False

if can_be_month(a) and can_be_month(b):
    print("ANBIGUOUS")
elif can_be_month(a):
    print("MMYY")
elif can_be_month(b):
    print("YYMM")
else:
    print("NA")

Fixed code:
ls=list(input())
first=[ls[0],ls[1]]
second=[ls[2],ls[3]]

if ls[0]=="0":
    del first[0]
if ls[2]=="0":
    del second[0]

a=int("".join(first))
b=int("".join(second))

def can_be_month(n):
    if n>=1 and n<=12:
        return True
    else:
        return False

if can_be_month(a) and can_be_month(b):
    print("AMBIGUOUS")
elif can_be_month(a):
    print("MMYY")
elif can_be_month(b):
    print("YYMM")
else:
    print("NA")
Buggy code:
s=input()
if (s[0]=="0" and s[1]!="0") or (s[0]=="1" and int(s[1])<=2):
    if (s[2]=="0" and s[1]!="0") or (s[2]=="1" and int(s[3])<=2):
        print("AMBIGOUS")
    else:
        print("MMYY")
elif (s[2]=="0" and s[3]!="0") or (s[2]=="1" and int(s[3])<=2):
    print("YYMM")
else:
    print("NA")

Fixed code:
s=input()
if (s[0]=="0" and s[1]!="0") or (s[0]=="1" and int(s[1])<=2):
    if (s[2]=="0" and s[3]!="0") or (s[2]=="1" and int(s[3])<=2):
        print("AMBIGUOUS")
    else:
        print("MMYY")
elif (s[2]=="0" and s[3]!="0") or (s[2]=="1" and int(s[3])<=2):
    print("YYMM")
else:
    print("NA")
Buggy code:
def get_format(a, b):
  if 0 < a < 12 and 0 < b < 12:
    return 'AMBIGUOUS'
  elif 0 < a < 12:
    return "MMYY"
  elif 0 < b < 12:
    return "YYMM"
  else:
    return 'NA'

s = input()
s1 = int(s[:2])
s2 = int(s[2:])
print(get_format(s1, s2))

Fixed code:
def get_format(a, b):
  if 0 < a < 13 and 0 < b < 13:
    return 'AMBIGUOUS'
  elif 0 < a < 13:
    return "MMYY"
  elif 0 < b < 13:
    return "YYMM"
  else:
    return 'NA'
 
s = input()
s1 = int(s[:2])
s2 = int(s[2:])
print(get_format(s1, s2))
Buggy code:
s = input()
s1 = int(s[:2])
s2 = int(s[2:])


if s1 <= 12 and s2 <= 12:
    print('AMBIGUOUS')
elif s1 > 12 and s2 <= 12:
    print('YYMM')
elif s2 > 12 and s1 <= 12:
    print('MMYY')
else:
    print("NA")


Fixed code:
s = input()
s1 = int(s[:2])
s2 = int(s[2:])


if 0 < s1 <= 12 and 0 < s2 <= 12:
    print('AMBIGUOUS')
elif (s1 == 0 or s1 > 12) and 0 < s2 <= 12:
    print('YYMM')
elif (s2 == 0 or s2 > 12) and 0 < s1 <= 12:
    print('MMYY')
else:
    print("NA")
Buggy code:
s=input()
yy = ["%02d" % i for i in range(100)]
mm = ["%02d" % i for i in range(1, 13)]
print(mm)
yymm = s[:2] in yy and s[2:] in mm
mmyy = s[:2] in mm and s[2:] in yy
print(["NA","MMYY","YYMM","AMBIGUOUS"][yymm*2+mmyy])


Fixed code:
s=input()
yy = ["%02d" % i for i in range(100)]
mm = ["%02d" % i for i in range(1, 13)]
yymm = s[:2] in yy and s[2:] in mm
mmyy = s[:2] in mm and s[2:] in yy
print(["NA","MMYY","YYMM","AMBIGUOUS"][yymm*2+mmyy])
Buggy code:
def is_mm(target):
    n = int(target)
    print(n)
    return 1 <= n <= 12


def get_result(first2_is_mm, last2_is_mm):
    if first2_is_mm and last2_is_mm:
        return "AMBIGUOUS"
    if not first2_is_mm and not last2_is_mm:
        return "NA"
    if first2_is_mm:
        return "MMYY"
    return "YYMM"


s = str(input())
first2, last2 = ((i + j) for (i, j) in zip(s[::2], s[1::2]))
print(get_result(is_mm(first2), is_mm(last2)))


Fixed code:
def is_mm(target):
    n = int(target)
    return 1 <= n <= 12


def get_result(first2_is_mm, last2_is_mm):
    if first2_is_mm and last2_is_mm:
        return "AMBIGUOUS"
    if not first2_is_mm and not last2_is_mm:
        return "NA"
    if first2_is_mm:
        return "MMYY"
    return "YYMM"


s = str(input())
first2, last2 = ((i + j) for (i, j) in zip(s[::2], s[1::2]))
print(get_result(is_mm(first2), is_mm(last2)))
Buggy code:
S = input()
f = int(S[:2])
l = int(S[3:5])

if (1 <= f <= 12 and (l > 12 or l == 0)):
    print('MMYY')
elif ((f > 12 or f == 0) and 1 <= l <= 12):
    print('YYMM')
elif ((f > 12 and l > 12) or (l == 0 and f == 0)):
    print('NA')
else:
    print('AMBIGUOUS')

Fixed code:
S = input()
f = int(S[:2])
l = int(S[2:4])
if (1 <= f and f <= 12 and (l > 12 or l == 0)):
    print('MMYY')
elif ((f > 12 or f == 0) and 1 <= l and l <= 12):
    print('YYMM')
elif ((f > 12 or f == 0) and (l == 0 or l > 12)):
    print('NA')
else:
    print('AMBIGUOUS')
Buggy code:
s = input()

#s = list(s)

mae = int(s[:2])
usi = int(s[2:])
#print(mae,usi)


if(mae >= 0 and mae <= 99 or usi >= 1 and usi <= 12):
  print("AMBIGUOUS")
elif(usi >= 0 and usi <= 99 or mae >= 1 and mae <= 12):
  print("AMBIGUOUS")
elif(mae == 0 and usi == 0):
  print("NA")
elif(mae == 0 and usi >= 12):
  print("NA")
elif(mae >= 12 and usi == 0):
  print("NA")
elif(mae >= 0 and mae <= 99 and usi >= 1 and usi <= 12):
  print("YYMM")
elif(usi >= 0 and usi <= 99 and mae >= 1 and mae <= 12):
  print("MMYY")
else:
  print("AMBIGUOUS")

Fixed code:
s = input()

#s = list(s)

mae = int(s[:2])
usi = int(s[2:])
#print(mae,usi)


if(mae >= 1 and mae <= 12 and usi >= 1 and usi <= 12):
  print("AMBIGUOUS")
elif(usi >= 1 and usi <= 12):
  print("YYMM")
elif(mae >= 1 and mae <= 12):
  print("MMYY")
else:
  print("NA")
Buggy code:
import bisect

lis[1, 12]

str = input()
tp = int(str[:2])
bt = int(str[2:])
if

tplo = bisect.bisect_right(lis, tp)
btlo = bisect.bisect_right(lis, bt)

if tp == 0:
    if bt == 1:
        jd = 3
    else:
        jd == 0
elif tp == 1:
    if bt == 1:
        jd == 2
    else:
        jd == 1
else:
    if bt == 1:
        jd == 0
    else:
        jd == 3

judge = ["YYMM", "MMYY", "AMBIGUOUS", "NA"]
print(judge[jd])


Fixed code:
import bisect

lis = [1, 13]

str = input()
tp = int(str[:2])
bt = int(str[2:])

tplo = bisect.bisect_right(lis, tp)
btlo = bisect.bisect_right(lis, bt)

if tplo == 1:
    if btlo == 1:
        jd = 2
    else:
        jd = 1
else:
    if btlo == 1:
        jd = 0
    else:
        jd = 3

judge = ["YYMM", "MMYY", "AMBIGUOUS", "NA"]

print(judge[jd])
Buggy code:
s=input()
s1=int(s[:2])
s2=int(s[2:])
if(s1==0 or s2==0):
  if(s1==0 and 1<=s2<=12):
    print("YYMM")
  elif(s2==0 and 1<=s1<=12):
    print("MMYY")
  else:
    print("NA")
if(1<=s1<=12):
  if(1<=s2<=12):
    print("AMBIGUOUS")
  else:
    print("MMYY")
else:
  if(1<=s2<=12):
    print("YYMM")
  else:
    print("NA")


Fixed code:
s=input()
s1=int(s[:2])
s2=int(s[2:])
if(s1==0 or s2==0):
  if(s1==0 and 1<=s2<=12):
    print("YYMM")
  elif(s2==0 and 1<=s1<=12):
    print("MMYY")
  else:
    print("NA")
elif(1<=s1<=12):
  if(1<=s2<=12):
    print("AMBIGUOUS")
  else:
    print("MMYY")
else:
  if(1<=s2<=12):
    print("YYMM")
  else:
    print("NA")
Buggy code:
S = int(input())

word = "NA","YYMM","MMYY","AMBIGUOUS"
S1 = int(S/100)
S2 = int(S%100)
answer = 0
if S1 > 0 and S1 < 13:
  if S2 >= 0 and S2 <= 99:
    answer = answer + 1
if S2 > 0 and S2 < 13:
  if S1 >= 0 and S1 <= 99:
    answer = answer + 2
print(word[answer])


Fixed code:
S = int(input())

word = "NA","MMYY","YYMM","AMBIGUOUS"
S1 = int(S/100)
S2 = int(S%100)
answer = 0
if S1 > 0 and S1 < 13:
  if S2 >= 0 and S2 <= 99:
    answer = answer + 1
if S2 > 0 and S2 < 13:
  if S1 >= 0 and S1 <= 99:
    answer = answer + 2
print(word[answer])
Buggy code:
S = input()
a = int(S[0:2])
b = int(S[2:4])

if 0 < a <= 12 and 0 < b <= 12:
    print("AMBIGUOS")
elif a > 12 and 0 < b <= 12:
    print("YYMM")
elif b > 12 and 0 < a <= 12:
    print("MMYY")
else:
    print("NA")

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

if 0 < a <= 12 and 0 < b <= 12:
    print("AMBIGUOUS")
elif a >= 0 and 0 < b <= 12:
    print("YYMM")
elif b >= 0 and 0 < a <= 12:
    print("MMYY")
else:
    print("NA")
Buggy code:
s = input()
fo = int(s[0] + s[1])
la = int(s[2] + s[3])
fism = fo < 13
lism = la < 13
if fism and lism:
    ans = "AMBIGUOUS"
if fism and not lism:
    ans = "MMYY"
if not fism and lism:
    ans = "YYMM"
if not fism and not lism:
    ans = "NA"
print(ans)

Fixed code:
s = input()
fo = int(s[0] + s[1])
la = int(s[2] + s[3])
fism = 00 < fo and fo < 13
lism = 00 < la and la < 13
if fism and lism:
    ans = "AMBIGUOUS"
if fism and not lism:
    ans = "MMYY"
if not fism and lism:
    ans = "YYMM"
if not fism and not lism:
    ans = "NA"
print(ans)
Buggy code:
S = input()

if 1 <= int(S[2] + S[3]) <= 12 and 1 <= int(S[0] + S[1]) <= 12:
  print('AMBIGUOUS')
elif 1 <= int(S[2] + S[3]) <= 12 and not (1 <= int(S[0] + S[1]) <= 12):
  print('YYMM')
elif 1 <= int(S[0] + S[1]) <= 12 and not (1 <= int(S[2] + S[3]) <= 12):
  print('MMYY')
else:
  print('NN')

Fixed code:
S = input()

if 1 <= int(S[2] + S[3]) <= 12 and 1 <= int(S[0] + S[1]) <= 12:
  print('AMBIGUOUS')
elif 1 <= int(S[2] + S[3]) <= 12 and not (1 <= int(S[0] + S[1]) <= 12):
  print('YYMM')
elif 1 <= int(S[0] + S[1]) <= 12 and not (1 <= int(S[2] + S[3]) <= 12):
  print('MMYY')
else:
  print('NA')
Buggy code:
S = input()
Y = int(S[:2])
M = int(S[2:])
if Y == 0 and M == 0:
  print("NA")
elif Y <= 12 and M <= 12:
  print("AMBIGUOUS")
elif M <= 12:
  print("YYMM")
elif Y <= 12:
  print("MMYY")
else:
  print("NA")

Fixed code:
S = input()
Y = int(S[:2])
M = int(S[2:])

if 0 < Y <13 and 0 < M < 13:
  print("AMBIGUOUS")
elif 0 < M < 13:
  print("YYMM")
elif 0 < Y < 13:
  print("MMYY")
else:
  print("NA")
Buggy code:
c = input()
f = int(c[:2])
e = int(c[2:]) 

if (0<f<13):
    print("MMYY")
    if(0<e<13):
        print("AMBIGUOUS")
else:
    if(0<e<13):
        print("YYMM")
    else:
        print("NA")


Fixed code:
c = input()
f = int(c[:2])
e = int(c[2:]) 

if (0<f<13) and (0<e<13):
    print("AMBIGUOUS")
elif (0<f<13):
    print("MMYY")
elif(0<e<13):
    print("YYMM")
else:
    print("NA")
Buggy code:
S=input()
AA=int(S[:2])
BB=int(S[2:])
print(["NA","MMYY","YYMM","AMBIGUOUS"][
    (AA<=12)+2*(BB<=12)
    ])

Fixed code:
S=input()
AA=int(S[:2])
BB=int(S[2:])
print(["NA","MMYY","YYMM","AMBIGUOUS"][
    (1<=AA<=12)+2*(1<=BB<=12)
    ])
Buggy code:
S=str(input())

if 0<int(S[0]+S[1])<=12 and 0<int(S[2]+S[3])<=12:
  print('AMBIGUOUS');exit()
elif S[0]+S[1]=='00':
  print('NA');exit()
elif  (S[0]+S[1]<=12 and S[2]+S[3]=='00') or int(S[0]+S[1])>12:
  print('YYMM');exit()
else:
  print('MMYY');exit()

Fixed code:
S=str(input())
A=int(S[0]+S[1])
B=int(S[2]+S[3])

if 0<A<=12 and 0<B<=12:
  print('AMBIGUOUS');exit()
elif (A>12 or A==0) and 0<B<=12:
  print('YYMM');exit()
elif 0<A<=12 and (B>12 or B==0):
  print('MMYY');exit()
else:
  print('NA');exit()
Buggy code:
a = input()
mae = int(a[:2])
usiro = int(a[2:])

if(1 <= mae <= 12):
    if(1 <= usiro <= 12):
        print('UMBIGOUS')
    else:
        print('MMYY')
else:
    if(1 <=usiro <= 12):
        print('YYMM')
    else:
        print('NA')


Fixed code:
a = input()
mae = int(a[:2])
usiro = int(a[2:])

if(1 <= mae <= 12):
    if(1 <= usiro <= 12):
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if(1 <= usiro <= 12):
        print('YYMM')
    else:
        print('NA')
Buggy code:
S = input()
pre = int(S[:2])
post = int(S[2:])
preM = pre > 0 and pre < 13
postM = post > 0 and pre < 13
if preM and postM:
  print('AMBIGUOUS')
elif preM:
  print('MMYY')
elif postM:
  print('YYMM')
else:
  print('NA')

Fixed code:
S = input()
pre = int(S[:2])
post = int(S[2:])
preM = pre > 0 and pre < 13
postM = post > 0 and post < 13
if preM and postM:
  print('AMBIGUOUS')
elif preM:
  print('MMYY')
elif postM:
  print('YYMM')
else:
  print('NA')
Buggy code:
# coding: utf-8
# Your code here!
A=input()
Y=int(A[0])*10+int(A[1])
M=int(A[2])*10+int(A[3])
code=0
if Y<20:
    if M>0 and M<13:
        code=1

if M<20:
    if Y>0 and Y<13:
        if code==1:
            code=3
        else:
            code=2
if Y==19:
    M==12:
        code=2
if Y=12:
    M=19:
        code=1
        
if code == 0:
    print("NA")
if code ==1:
    print("YYMM")
if code ==2:
    print("MMYY")
if code == 3:
    print("AMBIGUOUS")



Fixed code:
# coding: utf-8
# Your code here!
A=input()
Y=int(A[0])*10+int(A[1])
M=int(A[2])*10+int(A[3])
code=0
if Y<100:
    if M>0 and M<13:
        code=1

if M<100:
    if Y>0 and Y<13:
        if code==1:
            code=3
        else:
            code=2

if code == 0:
    print("NA")
if code ==1:
    print("YYMM")
if code ==2:
    print("MMYY")
if code == 3:
    print("AMBIGUOUS")
Buggy code:
S = input()
a = int(S[0:2])
b = int(S[2:4])
fym = False
fmy = False
if 1<=a<=12:
  fmy == True
if 1<=b<=12:
  fym == True
if fmy and fym:
  print("AMBIGUOUS")
elif fmy:
  print("MMYY")
elif fym:
  print("YYMM")
else:
  print("NA")

Fixed code:
S = input()
a = int(S[0:2])
b = int(S[2:4])
fym = False
fmy = False
if 1<=a<=12:
  fmy = True
if 1<=b<=12:
  fym = True
if fmy and fym:
  print("AMBIGUOUS")
elif fmy:
  print("MMYY")
elif fym:
  print("YYMM")
else:
  print("NA")
Buggy code:
def Check_Year(year):
    if str(year).isdecimal() :
        return 1
    else:
        return 0

def Check_Month(month):
    if 0 < month < 12:
        return 1
    else:
        return 0

input_data = list(input())
head_chrs = int(input_data[0] + input_data[1])
tail_chrs = int(input_data[2] + input_data[3])

print(input_data)

# check for YYMM format
result1 = Check_Year(head_chrs) + Check_Month(tail_chrs)
print('result1: ' , result1)
# Check for MMYY format
result2 = Check_Year(tail_chrs) + Check_Month(head_chrs)
print('result2: ' , result2)

if result1 == 2 and result2 == 2 :
    print('AMBIGUOUS')
elif result1 == 2 and result2 != 2 :
    print('YYMM')
elif result1 != 2 and result2 == 2 :
    print('MMYY')
else :
    print('NA')

Fixed code:
def Check_Year(year):
    if str(year).isdecimal() :
        return 1
    else:
        return 0

def Check_Month(month):
    if 0 < month < 13:
        return 1
    else:
        return 0

input_data = list(input())
head_chrs = int(input_data[0] + input_data[1])
# print('head: ', head_chrs)
tail_chrs = int(input_data[2] + input_data[3])
# print('tail: ', tail_chrs)

# print(input_data)

# check for YYMM format
result1 = Check_Year(head_chrs) + Check_Month(tail_chrs)
# print('result1: ' , result1)
# Check for MMYY format
result2 = Check_Year(tail_chrs) + Check_Month(head_chrs)
# print('result2: ' , result2)

if result1 == 2 and result2 == 2 :
    print('AMBIGUOUS')
elif result1 == 2 and result2 != 2 :
    print('YYMM')
elif result1 != 2 and result2 == 2 :
    print('MMYY')
else :
    print('NA')
Buggy code:
S = input()
if S[0] == '0' or (S[0] == '1'and (S[1] == '0' or S[1] == '1' or S[1]=='2')):
  if S[2] == '0' or (S[2]=='1' and (S[3]=='0' or S[3]=='1' or S[3]=='2')):
    print('AMBIGUOUS')
  else:
    print('MMYY')
elif S[2] == '0' or (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') or (S[0] == '1'and (S[1] == '0' or S[1] == '1' or S[1]=='2')):
  if (S[2] == '0'and S[3]!='0') or (S[2]=='1' and (S[3]=='0' or S[3]=='1' or S[3]=='2')):
    print('AMBIGUOUS')
  else:
    print('MMYY')
elif (S[2] == '0'and S[3]!='0') or (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 = s[0:2]
s2 = s[2:4]
res = ("1" if int(s[0:2]) <= 12 and int(s[0:2]) >= 0 else "0") + \
    ("1" if int(s[2:4]) <= 12 and int(s[2:4]) >= 0 else "0")

if(res == "11"):
    print("AMBIGUOUS")
elif(res == "10"):
    print("MMYY")
elif(res == "01"):
    print("YYMM")
elif(res == "00"):
    print("NA")


Fixed code:
s = input()
s1 = s[0:2]
s2 = s[2:4]
res = ("1" if int(s[0:2]) <= 12 and int(s[0:2]) > 0 else "0") + \
    ("1" if int(s[2:4]) <= 12 and int(s[2:4]) > 0 else "0")

if(res == "11"):
    print("AMBIGUOUS")
elif(res == "10"):
    print("MMYY")
elif(res == "01"):
    print("YYMM")
elif(res == "00"):
    print("NA")
Buggy code:
s=input()
f1=int(s[:2])<=12
f2=int(s[2:4])<=12
if f1 and f2:print("AMBIGUOUS")
elif not f1 and not f2:print("NA")
elif f1:print("MMYY")
else:print("YYMM")

Fixed code:
s=input()
f1=1<=int(s[:2])<=12
f2=1<=int(s[2:4])<=12
if f1 and f2:print("AMBIGUOUS")
elif not f1 and not f2:print("NA")
elif f1:print("MMYY")
else:print("YYMM")
Buggy code:
s = list(input())

if int(s[0]+s[1])>12 and 0<int(s[2]+s[3])<=12:
  print("YYMM")
  
elif 0<int(s[0]+s[1])<=12 and int(s[2]+s[3])>12:
  print("MMYY")
  
elif 0<int(s[0]+s[1])<=12 and 0<int(s[2]+s[3])<=12:
  print("AMBIGUOUS")
  
elif int(s[0]+s[1])==0 and 0<int(s[2]+s[3])<=12:
  print("YYMM")
  
elif int(s[2]+s[3])==0 and 0<int(s[0]+s[1])<=12:
  print("MMYY")
  

Fixed code:
s = list(input())

if int(s[0]+s[1])>12 and 0<int(s[2]+s[3])<=12:
  print("YYMM")
  
elif 0<int(s[0]+s[1])<=12 and int(s[2]+s[3])>12:
  print("MMYY")
  
elif 0<int(s[0]+s[1])<=12 and 0<int(s[2]+s[3])<=12:
  print("AMBIGUOUS")
  
elif int(s[0]+s[1])==0 and 0<int(s[2]+s[3])<=12:
  print("YYMM")
  
elif int(s[2]+s[3])==0 and 0<int(s[0]+s[1])<=12:
  print("MMYY")
  
else:
  print("NA")
Buggy code:
s=input()
a=s[:1]
b=s[2:]
if (1<=a<=12 and 1<=b<=12):
  print('AMBIGUOUS')
elif (1<=a<=12 and (b=0 or 13<b):
      print('MMYY')
elif (1<=b<=12 and (a=0 or 13<a):
      print('YYMM')
else:
      print('NA')

Fixed code:
s=input()
a=int(s[:2])
b=int(s[2:])
if (1<=a<=12) and (1<=b<=12):
  print('AMBIGUOUS')
elif (1<=a<=12) and (b==0 or 12<b):
      print('MMYY')
elif (1<=b<=12) and (a==0 or 12<a):
      print('YYMM')
else:
      print('NA')
Buggy code:
s=input()
a=int(s[:2])
b=int(s[2:])
if (1<=a<=12 and 1<=b<=12):
  print('AMBIGUOUS')
elif (1<=a<=12 and (b=0 or 13<b):
      print('MMYY')
elif (1<=b<=12 and (a=0 or 13<a):
      print('YYMM')
else:
      print('NA')

Fixed code:
s=input()
a=int(s[:2])
b=int(s[2:])
if (1<=a<=12)and(1<=b<=12):
  print('AMBIGUOUS')
elif (1<=a<=12)and(b==0 or b>12):
  print('MMYY')
elif (a==0 or a>12)and(1<=b<=12):
  print('YYMM')
else:
  print('NA')
Buggy code:
s=list(input())
s=[int(i) for i in s]
s=[s[0]*10+s[1],s[2]*10+s[3]]
if (s[0]==0 and s[1]==0) or (s[0]!=0 and s[1]==0) or (s[0]>12 and s[1]==0):
  print("NA")
if (s[0]<=12 and s[0]!=0) and (s[1]<=12 and s[1]!=0):
  print("AMBIGUOUS")
elif (s[0]<=12 and s[0]!=0):
  print("MMYY")
elif (s[1]<=12 and s[1]!=0):
  print("YYMM")
else:
  print("NA")

Fixed code:
s=list(input())
s=[int(i) for i in s]
s=[s[0]*10+s[1],s[2]*10+s[3]]
if (s[0]==0 and s[1]==0) or (s[0]>12 and s[1]==0):
  print("NA")
elif (s[0]<=12 and s[0]!=0) and (s[1]<=12 and s[1]!=0):
  print("AMBIGUOUS")
elif (s[0]<=12 and s[0]!=0):
  print("MMYY")
elif (s[1]<=12 and s[1]!=0):
  print("YYMM")
else:
  print("NA")
Buggy code:
s = input()
if s == '0000' or (int(s[:2]) >= 13 and int(s[-2:]) >= 13):
    print('NA')
elif int(s[:2]) <= 12 and int(s[-2:]) <= 12:
    print('AMBIGUOUS')
elif int(s[:2]) <= 12:
    print('MMYY')
elif int(s[-2:]) <= 12:
    print('YYMM')

Fixed code:
s = input()
if s == '0000' or (int(s[:2]) >= 13 and int(s[-2:]) >= 13):
    print('NA')
elif 1 <= int(s[:2]) <= 12 and 1 <= int(s[-2:]) <= 12:
    print('AMBIGUOUS')
elif 1 <= int(s[:2]) <= 12:
    print('MMYY')
elif 1 <= int(s[-2:]) <= 12:
    print('YYMM')
else:
    print('NA')
Buggy code:
def solve():
    s = input()
    a = int(s[:2])
    if a == 0 or a > 12:
        x = "YY"
    else:
        x = "MM"
    b = int(s[2:])
    if b == 0 or b > 12:
        y = "YY"
    else:
        y = "MM"
    if x + y == "YYYY":
        print("NA")
    elif x + y == "MMMM":
        print("AMBIGUOUS")
    else:
        print(x + y)


#solve()


Fixed code:
def solve():
    s = input()
    a = int(s[:2])
    if a == 0 or a > 12:
        x = "YY"
    else:
        x = "MM"
    b = int(s[2:])
    if b == 0 or b > 12:
        y = "YY"
    else:
        y = "MM"
    if x + y == "YYYY":
        print("NA")
    elif x + y == "MMMM":
        print("AMBIGUOUS")
    else:
        print(x + y)


solve()
Buggy code:
s = str(input())

date = [int(s[:2]), int(s[2:])]

if 1 <= date[0] <= 12 and 1 <= date[1] <= 12:
    print('AMBIGUOUS')
elif 1 <= date[1] <= 12:
    print('YYMM')
elif 1 <= date[0] <= 12:
    print('MMYY')
else:
    print('NA')
    
print(date)

Fixed code:
s = str(input())

date = [int(s[:2]), int(s[2:])]

if 1 <= date[0] <= 12 and 1 <= date[1] <= 12:
    print('AMBIGUOUS')
elif 1 <= date[1] <= 12:
    print('YYMM')
elif 1 <= date[0] <= 12:
    print('MMYY')
else:
    print('NA')
Buggy code:
S = input()

a = 10*int(S[0])+int(S[1])
b = 10*int(S[2])+int(S[3])

if a>12 and b>12:
    print('NA')
elif a>12 and b<=12:
    print('YYMM')
elif a<=12 and b>12:
    print('MMYY')
else:
    print('AMBIGVOUS')

Fixed code:
S = input()

a = 10*int(S[0])+int(S[1])
b = 10*int(S[2])+int(S[3])

if 1<=a<=12 and 1<=b<=12:
    print('AMBIGUOUS')
elif 1<=b and b<=12:
    print('YYMM')
elif 1<=a and a<=12:
    print('MMYY')
else:
    print('NA')
Buggy code:
s=input()
if int(s[2:])!=0 and int(s[2:])<=12:
  if int(s[:2])!=0 int(s[:2])<=12:
    print('AMBIGUOUS')
  else:
    print('YYMM')
else:
  if int(s[:2])!=0 int(s[:2])<=12:
    print('MMYY')
  else:
    print('NA')


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

Fixed code:
s=input()
if int(s[2:])!=0 and int(s[2:])<=12:
  if int(s[:2])!=0 and int(s[:2])<=12:
    print('AMBIGUOUS')
  else:
    print('YYMM')
else:
  if int(s[:2])!=0 and int(s[:2])<=12:
    print('MMYY')
  else:
    print('NA')
Buggy code:
S = input()
a = int(S[:2]) < 13
b = int(S[2:]) < 13

if a and b:
    print('AMBIGUOUS')
elif a and not b:
    print('MMYY')
elif (not a) and b:
    print('YYMM')

else:
    print('NA')

Fixed code:
S = input()
a = int(S[:2]) < 13 and S[:2] != '00'
b = int(S[2:]) < 13  and S[2:] != '00'


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