qyliang/CodeNanoFix huggingface dataset:
Buggy code:
s = list(input())
if s[0] == "0":
    s[0] = ''
if s[2] == "0":
    s[2] = ''
x = int(s[0]+s[1])
y = int(s[2]+s[3])



if (x <= 12 and x >= 1) and (y >= 0 and y <=12):
    print("AMBIGOUS")

elif(x >0 and (y >= 1 and y <= 12)):
    print("YYMM")

elif(y >0 and (x >= 1 and x <= 12)):
    print("MMYY")

else:
    print("NA")

Fixed code:
s = list(input())
if s[0] == "0":
    s[0] = ''
if s[2] == "0":
    s[2] = ''
x = int(s[0]+s[1])
y = int(s[2]+s[3])

if (x <= 12 and x >= 1) and (y >=1 and y <=12):
    print("AMBIGUOUS")

elif(x >= 0 and (y >= 1 and y <= 12)):
    print("YYMM")

elif(y >= 0 and (x >= 1 and x <= 12)):
    print("MMYY")

else:
    print("NA")
Buggy 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 > 12 and b > 12) or a == 0 or b == 0:
    print("NA")
elif a > 12:
    print("YYMM")
elif b > 12
    print("MMYY")

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 or a > 12) and 0 < b <= 12:
    print("YYMM")
elif (b == 0 or b > 12) and 0 < a <= 12:
    print("MMYY")
else:
    print("NA")
Buggy code:
s=int(input())
x=a%100
y=a//100
print(("AMBIGUOUS" if 0<x<13 else "MMYY") if 0<y<13 else "YYMM" if 0<x<13 else "NA")

Fixed code:
s=int(input())
x=s%100
y=s//100
print(("AMBIGUOUS" if 0<x<13 else "MMYY") if 0<y<13 else "YYMM" if 0<x<13 else "NA")
Buggy code:
from sys import stdin
# stdin = open('./input.txt')
l = stdin.readline().rstrip()
month_possible = ['01','02','03','04','05','06','07','08','09','10','11','12']
year_possible = ['00']

fo = ''.join(l[0:2])
la = ''.join(l[2:-1])

if int(fo) == 0 or int(la) == 0:
    print("NA")
    exit(0)
if 0 < int(fo) <= 12:
    if 0 < int(la) <= 12:
        print("AMBIGUOUS")
    elif 0 < int(la) < 100:
        print("MMYY")
    else:
        print("NA")
else:
    if 0 < int(la) <= 12:
        print("YYMM")
    else:
        print("NA")


Fixed code:
from sys import stdin
# stdin = open('./input.txt')
l = stdin.readline().rstrip()
month_possible = ['01','02','03','04','05','06','07','08','09','10','11','12']
year_possible = ['00']

fo = ''.join(l[0:2])
la = ''.join(l[2:])

if 0 < int(fo) <= 12:
    if 0 < int(la) <= 12:
        print("AMBIGUOUS")
    elif 0 <= int(la) < 100:
        print("MMYY")
    else:
        print("NA")
else:
    if 0 < int(la) <= 12:
        print("YYMM")
    else:
        print("NA")
Buggy code:
if __name__ == "__main__":
    s = input()

    i1 = int(s[0:2])
    i2 = int(s[2:4])

    print(i1)
    print(i2)

    ans = ""
    if i1 < 1 or i2 < 1:
        ans = "NA"
    else:
        if i1 < 13:
            if i2 < 13:
                ans = "AMBIGUOUS"
            else:
                ans = "MMYY"
        else:
            if i2 < 13:
                ans = "YYMM"
            else:
                ans = "NA"
    print(ans)


Fixed code:
if __name__ == "__main__":
    s = input()

    i1 = int(s[0:2])
    i2 = int(s[2:4])

    ans = ""
    if i1 == 0 or i2 == 0:
        if i1 == 0 and i2 == 0:
            ans = "NA"
        elif i1 == 0 and i2 < 13:
            ans = "YYMM"
        elif i2 == 0 and i1 < 13:
            ans = "MMYY"
        else:
            ans = "NA"
    else:
        if i1 < 13:
            if i2 < 13:
                ans = "AMBIGUOUS"
            else:
                ans = "MMYY"
        else:
            if i2 < 13:
                ans = "YYMM"
            else:
                ans = "NA"
    print(ans)
Buggy code:
s = int(input())
a = 0
b = 0
if s%100 <= 12:
  a = 1
if int(s/100) <= 12:
  b = 1
if a == 1:
  if b == 1:
    print('AMBIGUOUS')
  else:
    print('YYMM')
else:
  if b == 1:
    print('MMYY')
  else:
    print('NA')

Fixed code:
s = int(input())
a = 0
b = 0
if s%100 <= 12 and s%100 != 0:
  a = 1
if int(s/100) <= 12 and int(s/100) != 0:
  b = 1
if a == 1:
  if b == 1:
    print('AMBIGUOUS')
  else:
    print('YYMM')
else:
  if b == 1:
    print('MMYY')
  else:
    print('NA')
Buggy code:
def check(S) :
    mae = int(S[:2])
    ato = int(S[2:])
    if mae == 0 :
        return "NA"
    if ato == 0 :
        return "NA"
    if mae > 12 and ato > 12 :
        return "NA"
    if mae < 13 and ato < 13 :
        return "AMBIGUOUS"
    
    if mae < 13 :
        return "MMYY"
    if mae > 12
        return "YYMM"


S = input()
print(check(S))


Fixed code:
def check(S) :
    mae = int(S[:2])
    ato = int(S[2:])
    
    if mae == 0 and ato <= 12 and ato > 0 :
        return "YYMM"
    if ato == 0 and mae <= 12 and mae > 0 :
        return "MMYY"
    
    if mae == 0 or ato == 0 :
        return "NA"
    if mae > 12 and ato > 12 :
        return "NA"
    if mae <= 12 and ato <= 12 :
        return "AMBIGUOUS"
    if mae > 12 :
        return "YYMM"

    return "MMYY"
    
    

S = input()
print(check(S))
Buggy code:
string = input()

moji_list = []
for i in range(4):
    moji_list[i] = string[i]

ue = ''
sita = ''
for j in range(2):
    ue += moji_list[i]
    sita += moji_list[i+2]

int_ue = int(ue)
int_sita = int(sita)

sw_ue = 0
sw_sita = 0
if 1<=int_ue and int_ue<=12:
    sw_ue += 1

if 1<=int_sita and int_sita<=12:
    sw_sita += 1

if sw_ue == 1 and sw_sita == 1:
    print('AMBIGUOUS')
elif sw_ue == 1 and sw_sita == 0:
    print('MMYY')
elif sw_ue == 0 and sw_sita == 1:
    print('YYMM')
elif sw_ue == 0 and sw_sita == 0:
    print('NA')

Fixed code:
string = input()

moji_list = [0 for _ in range(4)]
for i in range(4):
    moji_list[i] = string[i]

ue = ''
sita = ''
for j in range(2):
    ue += moji_list[j]
    sita += moji_list[j+2]

int_ue = int(ue)
int_sita = int(sita)

sw_ue = 0
sw_sita = 0
if 1<=int_ue and int_ue<=12:
    sw_ue += 1

if 1<=int_sita and int_sita<=12:
    sw_sita += 1

if sw_ue == 1 and sw_sita == 1:
    print('AMBIGUOUS')
elif sw_ue == 1 and sw_sita == 0:
    print('MMYY')
elif sw_ue == 0 and sw_sita == 1:
    print('YYMM')
elif sw_ue == 0 and sw_sita == 0:
    print('NA')
Buggy code:
s = input()
front = int(s[:2])
back = int(s[2:4])
if front <= 12 and back <= 12:
    print('AMBIGUOUS')
elif (front <=12 and back > 12):
    print('MMYY')
elif front > 12 and back <=12:
    print('YYMM')
else:
    print('NA')

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

if s[:1] <= 12 and s[2:] <= 12:
  print("AMBIGUOUS")
elif s[:1] <= 12:
  print("MMYY")
elif s[2:] <= 12:
  print("YYMM")
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()
s = list(S)
L = int(s[0] + s[1])
R = int(s[2] + s[3])
if L < 12 and R<12:
    print('AMBIGUOUS')
elif R < 12:
    print('YYMM')
elif L<12:
    print('MMYY')
else:
    print('NA')

Fixed code:
S = input()
s = list(S)
L = int(s[0] + s[1])
R = int(s[2] + s[3])
if 0< L <= 12:
    if 0<R<=12:
        print('AMBIGUOUS')
    else:
        print('MMYY')        
elif 0< R <= 12:
    print('YYMM')
else:
    print('NA')
Buggy code:
S=input()
S1=int(S[0:2])
S2=int(S[2:4])
print(S1, S2)
if 1<=S1<=12:
    if 1<=S2<=12:
        print('AMBIGUOUS')
    else:
        print('MMYY')
elif 1<=S2<=12:
    print('YYMM')
else:
    print('NA')

Fixed code:
S=input()
S1=int(S[0:2])
S2=int(S[2:4])
if 1<=S1<=12:
    if 1<=S2<=12:
        print('AMBIGUOUS')
    else:
        print('MMYY')
elif 1<=S2<=12:
    print('YYMM')
else:
    print('NA')
Buggy code:
S = int(input())
yymm = S//100
mmyy = S%100
yymm = (1<=y<=12)
mmyy = (1<=x<=12)

ans = "NA"
if yymm and mmyy:
    answer = 'AMBIGUOUS'
elif yymm and not(mmyy):
    answer = 'YYMM'
elif mmyy and not(yymm):
    answer = 'MMYY'

print(ans)  

Fixed code:
S = int(input())
x = S//100
y = S%100
yymm = (1<=y<=12)
mmyy = (1<=x<=12)

ans = "NA"
if yymm and mmyy:
    ans = 'AMBIGUOUS'
elif yymm and not(mmyy):
    ans = 'YYMM'
elif mmyy and not(yymm):
    ans = 'MMYY'

print(ans)
Buggy code:
N = input()
n = [int(N[:2]), int(N[2:])]
a = ['YYMM', 'MMYY', 'AMBIGUOUS', 'NA']
if n[0] > 12 or n[0] == 0:
  del a[1]
  del a[2]
  if n[1] > 12 or n[1] == 0:
    del a[0]
elif n[1] > 12 or n[1] == 0:
  del a[0],a[2]
else:
  a = a[2]
print(a[0])

Fixed code:
N = input()
n = [int(N[:2]), int(N[2:])]
a = ['YYMM', 'MMYY', 'AMBIGUOUS', 'NA']
if n[0] > 12 or n[0] == 0:
  del a[1]
  del a[1]
  if n[1] > 12 or n[1] == 0:
    del a[0]
elif n[1] > 12 or n[1] == 0:
  del a[0]
  del a[1]
else:
  a = [a[2]]
print(a[0])
Buggy code:
s = input()
s1 = s[0:2]
s2 = s[2:4]

i1 = int(s1)
i2 = int(s2)
 
if i1 == 0 or i2 == 0: res ="NA"
if i1 <=12:
    if i2 <= 12:
        res = "AMBIGUOUS"
    else:
        res = "MMYY"
elif 12 < i1:
    if i2 <= 12:
        res = "YYMM"
    else:
        res = "NA"

print(res)


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

i1 = int(s1)
i2 = int(s2)
 
if 1 <= i1 <=12 and 1 <= i2 <= 12:
    res = "AMBIGUOUS"
elif 1 <= i1 <= 12:
    res = "MMYY"
elif 1 <= i2 <= 12:
    res = "YYMM"
else:
    res = "NA"

print(res)
Buggy code:
S=list(input())
BE=[int(S[0]),int(S[1])]
AF=[int(S[2]),int(S[3])]
b_flag=0
a_flag=0
if BE[0] == 0:
    b_flag=1
if BE[0] == 1 and BE[1] <=2:
    b_flag=1
if AF[0] == 0:
    a_flag=1
if AF[0] == 1 and AF[1] <=2:
    a_flag=1
if a_flag ==1 and b_flag==1:
    print('AMBIGUOUS')
elif a_flag ==1:
    print('YYMM')
elif b_flag==1:
    print('MMYY')
else:
    print('NA')


Fixed code:
S=list(input())
BE=[int(S[0]),int(S[1])]
AF=[int(S[2]),int(S[3])]
b_flag=0
a_flag=0
if BE[0] == 0 and BE[1]>=1:
    b_flag=1
if BE[0] == 1 and BE[1] <=2:
    b_flag=1
if AF[0] == 0 and AF[1]>=1:
    a_flag=1
if AF[0] == 1 and AF[1] <=2:
    a_flag=1
if a_flag ==1 and b_flag==1:
    print('AMBIGUOUS')
elif a_flag ==1:
    print('YYMM')
elif b_flag==1:
    print('MMYY')
else:
    print('NA')
Buggy code:

S = list(input())

front = int(S[0]+S[1])
rear = int(S[2]+S[3])


if front <= 0 and rear <= 0:
    print("NA")
elif front <= 0 and rear <= 12:
    print("YYMM")
elif front <= 12 and rear <= 0:
    print("MMYY")
elif front <= 12 and rear <= 12:
    print("AMBIGUOUS")
elif front <= 12:
    print("MMYY")
elif rear <= 12:
    print("YYMM")
else:
    print("NA")

Fixed code:

S = list(input())

front = int(S[0]+S[1])
rear = int(S[2]+S[3])


if front <= 12 and front >= 1:
    if rear <= 12 and rear >= 1:
        print("AMBIGUOUS")
    else:
        print("MMYY")
elif rear <= 12 and rear >= 1:
    print("YYMM")
else:
    print("NA")
Buggy code:
n = input()
a = int(n[0:2])
b = int(n[2:])
if 1 <= a <= 12 and 1 <= b <= 12:
	print('AMBIGUOUS')
elif 1 <= a <= 12 and b > 12:
	print('MMYY')
elif 1 <= b <= 12 and a > 12:
	print('YYMM')
else:
print('NA')


Fixed code:
n = input()
a = int(n[:2])
b = int(n[2:])
if 1 <= a <= 12 and 1 <= b <= 12:
	print('AMBIGUOUS')
elif 1 <= a <= 12:
	print('MMYY')
elif 1 <= b <= 12:
	print('YYMM')
else:
	print('NA')
Buggy code:
s=input()
a=int("".join(s[0:2]))
b=int("".join(s[2:4]))
ans=0
if b<32 and a!=00 and b!=00:
    ans+=1
if a<32 and a!=00 and b!=00:
    ans+=2
if ans==3:
    print("AMBIGUOUS")
elif ans==2:
    print("MMYY")
elif ans==1:
    print("YYMM")
else:
    print("NA")

Fixed code:
s=input()
a=int("".join(s[0:2]))
b=int("".join(s[2:4]))
ans=0
if b<13 and b!=00:
    ans+=1
if a<13 and a!=00:
    ans+=2
if ans==3:
    print("AMBIGUOUS")
elif ans==2:
    print("MMYY")
elif ans==1:
    print("YYMM")
else:
    print("NA")
Buggy code:
s = input()

ans = ''
if int(s[0:2])>12 and int(s[2:4])==0:
  ans = 'NA'
elif int(s[0:2])>12 and int(s[2:4])>0:
  ans = 'YYMM'
elif 0<int(s[0:2]) and int(s[0:2])<=12 and int(s[2:4])==0:
  ans = 'MMYY'
elif 0<int(s[0:2]) and int(s[0:2])<=12 and int(s[2:4])<=12:
  ans = 'AMBIGOUS'
elif 0<int(s[0:2]) and int(s[0:2])<=12 and int(s[2:4])>12:
  ans = 'MMYY'
elif 0==int(s[0:2]) and 0<int(s[2:4]) and int(s[2:4])<=12:
  ans = 'YYMM'
else:
  ans = 'NA'
print(ans)

Fixed code:
s = input()

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

if 0<a<13:
    if 0<b<13:
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if -1<b<13:
        print("YYMM")
    else:
        print("NA")


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

if 0<a<13:
    if 0<b<13:
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if 0<b<13:
        print("YYMM")
    else:
        print("NA")
Buggy code:
s = input()
my, ym = 0< int(s[:2]) <13, 0< int(s[2:]) <13

my,ym = 0<int(s[:2])<13,0<int(s[2:])<13

if my and ym:
    print('AMBIGUOUS')
    
elif my:
    print('YYMM')
    
elif ym:
    print("MMYY")
    
else:
    print("NA")

Fixed code:
s = input()

my,ym = 0<int(s[:2])<13,0<int(s[2:])<13

if my and ym:
    print('AMBIGUOUS')
    
elif my:
    print('MMYY')
    
elif ym:
    print("YYMM")
    
else:
    print("NA")
Buggy code:
import sys

s = input()

former = int(s[:2])
latter = int(s[2:])

##YYMM
if ((former > 12) and (latter <= 12)):
    print('YYMM')
    sys.exit()

##MMYY
if ((former <= 12) and (latter > 12)):
    print('MMYY')
    sys.exit()

##AMBIGUOUS
if ((former <= 12) and (latter <= 12)):
    print('AMBIGUOUS')
    sys.exit()

##NA
if ((former > 12) and (latter > 12)):
    print('NA')
    sys.exit()

Fixed code:
import sys

s = input()

former = int(s[:2])
latter = int(s[2:])

##YYMM
if ((former > 12 or former==0) and (latter <= 12 and latter > 0)):
    print('YYMM')
    sys.exit()

##MMYY
if ((former <= 12 and former > 0) and (latter > 12 or latter==0)):
    print('MMYY')
    sys.exit()

##AMBIGUOUS
if ((former <= 12 and former > 0) and (latter <= 12 and latter > 0)):
    print('AMBIGUOUS')
    sys.exit()

##NA
print('NA')
Buggy code:
S = list(input())

left =  ''.join(S[0:2])
right = ''.join(S[2:4])


left_flag = 0
right_flag = 0
if int(left) <= 12 and left != '00':
    left_flag = 1

if int(right) <= 12 and right != '00':
    right_flag = 1


if left_flag == 1 and right_flag == 0:
    print('MMYY')
elif left_flag == 1 and right_flag == 1:
    print('Ambiguous')
elif left_flag == 0 and right_flag == 1:
    print('YYMM')
else:
    print('NA')

Fixed code:
S = list(input())

left =  ''.join(S[0:2])
right = ''.join(S[2:4])


left_flag = 0
right_flag = 0
if int(left) <= 12 and left != '00':
    left_flag = 1

if int(right) <= 12 and right != '00':
    right_flag = 1


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

Fixed code:
s = input()

a = int(s[0:2])
b = int(s[2:])

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

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


Fixed code:
s = input()
if 0 < int(s[:2]) <= 12 :
  if 0 <int(s[2:]) <= 12 :
    print("AMBIGUOUS")
  else:
    print("MMYY")
else:
  if 0 < int(s[2:]) <= 12 :
    print("YYMM")
  else:
    print("NA")
Buggy code:
def main():
    S = input()
    first = int(S[0:2])
    last = int(S[2:4])

    if(first>12 and last<=12):
        print("YYMM")
    elif(last>12 and first<=12):
        print("MMYY")
    elif(last<=12 and first<=12):
        print("AMBIGUOUS")
    else:
        print("NA")
    
    return
main()


Fixed code:
def main():
    S = input()
    first = int(S[0:2])
    last = int(S[2:4])

    if((first>12 or first==0) and last<=12 and last>=1):
        print("YYMM")
    elif((last>12 or last==0) and first<=12 and first>=1):
        print("MMYY")
    elif(last<=12 and first<=12 and last>=1 and first>=1):
        print("AMBIGUOUS")
    else:
        print("NA")
    
    return
main()
Buggy code:
def main():
    s = list(input())
    left = int(s[0] + s[1])
    right = int(s[2] + s[3])

    if 1 <= left and left <= 12:
        if 1 <= right and right <= 12:
            return "AMIGUOUS"
        else:
            return "MMYY"
    else:
        if 1 <= right and right <= 12:
            return "MMYY"
        else:
            return "NA"

print(main())


Fixed code:
def main():
    s = list(input())
    left = int(s[0] + s[1])
    right = int(s[2] + s[3])

    if 1 <= left and left <= 12:
        if 1 <= right and right <= 12:
            return "AMBIGUOUS"
        else:
            return "MMYY"
    else:
        if 1 <= right and right <= 12:
            return "YYMM"
        else:
            return "NA"

print(main())
Buggy code:
S = input()

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

print(a, b)

isYYMM = 1 <= b <= 12
isMMYY = 1 <= a <= 12

if isYYMM and isMMYY:
    print('NA')
elif isYYMM:
    print('YYMM')
elif isMMYY:
    print('MMYY')
else:
    print('AMBIGUOUS')


Fixed code:
S = input()

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

isYYMM = 1 <= b <= 12
isMMYY = 1 <= a <= 12

if isYYMM and isMMYY:
    print('AMBIGUOUS')
elif isYYMM:
    print('YYMM')
elif isMMYY:
    print('MMYY')
else:
    print('NA')
Buggy code:
S=int(input())
head=int(S/100)
tail=S-head*100
head_can_month = head<=12 and head>=1
tail_can_month = tail<=12 and tail>=1
if head_can_month:
    if tail_can_month:
        print("AMNIGUOUS")
    else:
        print("MMYY")
else:
    if tail_can_month:
        print("YYMM")
    else:
        print("NA")

Fixed code:
S=int(input())
head=int(S/100)
tail=S-head*100
head_can_month = head<=12 and head>=1
tail_can_month = tail<=12 and tail>=1
if head_can_month:
    if tail_can_month:
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if tail_can_month:
        print("YYMM")
    else:
        print("NA")
Buggy code:
s = input()

a = int(s[:2])
b = int(s[2:])
if 0 < a <= 12 and 0 < b <= 12:
  print("AMBIGUOUS")
elif a > 12 or a != 0 and b > 12 or b == 0:
  print("NA")
elif a > 12 and 0 < b <= 12:
  print("YYMM")
elif 0 < a <= 12 and b > 12:
  print("MMYY")

Fixed code:
s = input()

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

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


Fixed code:
s = list(i for i in input())
x,y = int(s[0] + s[1]),int(s[2] + s[3])
if x < 13 and x > 0 and y < 13 and y > 0:
  print('AMBIGUOUS')
elif (x >= 13 or x == 0) and y < 13 and y > 0:
  print('YYMM')
elif x < 13 and x > 0 and (y >= 13 or y == 0):
  print('MMYY')
else:
  print('NA')
Buggy code:
S = int(input())
x = 0
a = S//100
b = S%100
if a>=1 and a<=12:
    x+=1
if b>=1 and a<=12:
    x+=1
if x = 0:
    print("NA")
elif x = 2:
    print("AMBIGUOUS")
if x = 1:
    if a>=1 and a<=12:
        print("MMYY")
    else:
        print("YYMM")

Fixed code:
S = int(input())
x = 0
a = S//100
b = S%100
if a>=1 and a<=12:
    x+=1
if b>=1 and b<=12:
    x+=1
if x == 0:
    print("NA")
elif x == 2:
    print("AMBIGUOUS")
if x == 1:
    if a>=1 and a<=12:
        print("MMYY")
    else:
        print("YYMM")
Buggy code:
s = int,(input())
a = s//100
b = s%100

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

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

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

Fixed code:
s=input()
mae=s[0]+s[1]
ato=s[2]+s[3]
if 1<=int(mae)<=12 and 1<=int(ato)<=12:
  print("AMBIGUOUS")
elif 1<=int(mae)<=12:
  print("MMYY")
elif 1<=int(ato)<=12:
  print("YYMM")
else:
  print("NA")
Buggy code:
s = input()

YYMM = False
MMYY = False
month = []
for i in range(1,13):
  if len(str(i))==1:
    month.append("0"+str(i))
  else:
    month.append(str(i))
    
if s[:2] in month:
  MMYY = True
  
if[2:] in month:
  YYMM = True
  
if MMYY is True and YYMM is True:
  print("AMBIGUOUS")
elif MMYY is True and YYMM is False:
  print("MMYY")
elif MMYY is False and YYMM is True:
  print("YYMM")
else:
  print("NA")

Fixed code:
s = input()

YYMM = False
MMYY = False
month = []
for i in range(1,13):
  if len(str(i))==1:
    month.append("0"+str(i))
  else:
    month.append(str(i))
    
if s[:2] in month:
  MMYY = True
  
if s[2:] in month:
  YYMM = True
  
if MMYY is True and YYMM is True:
  print("AMBIGUOUS")
elif MMYY is True and YYMM is False:
  print("MMYY")
elif MMYY is False and YYMM is True:
  print("YYMM")
else:
  print("NA")
Buggy code:
# coding: utf-8
# Your code here!

s = input()

fs = s[:2]
bs = s[2:]

if fs>"00" and fs<="12":
    if bs>"00" and bs<="12":
        print("AMBIGUOUS")
    else:
        print("YYMM")
else:
    if bs>"00" and bs<="12":
        print("MMYY")
    else:
        print("NA")


Fixed code:
# coding: utf-8
# Your code here!

s = input()

fs = s[:2]
bs = s[2:]

if fs>"00" and fs<="12":
    if bs>"00" and bs<="12":
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if bs>"00" and bs<="12":
        print("YYMM")
    else:
        print("NA")
Buggy code:
S = input()
a = int(S[:2])
b = int(S[2:])

ym = False
my = False
if a > 0 and b>0 and b <= 12:
  ym = True
if b > 0 and a>0 and a <= 12:
  my = True

if ym and my:
  print("AMBIGOUS")
elif ym and not(my):
  print('YYMM')
elif not(ym) and ym:
  print('MMYY')
else:
  print('NA')

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

ym = False
my = False
if a >= 0 and b>0 and b <= 12:
  ym = True
if b >= 0 and a>0 and a <= 12:
  my = True

if ym and my:
  print("AMBIGUOUS")
elif ym and not(my):
  print('YYMM')
elif not(ym) and my:
  print('MMYY')
else:
  print('NA')
Buggy code:
S = input()
L = int(S[:2])
R = int(S[2:])
if (1<=L<=12):
    if (1<=R<=12):
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if (1<=R<=12):
        print("YYMM")
    else:
        print("NO")

Fixed code:
S = input()
L = int(S[:2])
R = int(S[2:])
if (1<=L<=12):
    if (1<=R<=12):
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if (1<=R<=12):
        print("YYMM")
    else:
        print("NA")