qyliang/CodeNanoFix huggingface dataset:
Buggy code:
input_str = input()[:4]
head = int(input_str[:2])
foot = int(input_str[2:4])

if head > 12:
    if foot > 12 or foot < 0:
        print('NA') 
    else:
        print('YYMM')
else:
    if head > 0 and foot <= 12 and foot > 0:
        print('AMBIGUOUS')
    elif head > 0 and foot > 12:
        print('MMYY')
    elif head == 0 and foot > 0 and foot <= 12:
        print('YYMM')
    else:
        print('NA')


Fixed code:
input_str = input()[:4]
head = int(input_str[:2])
foot = int(input_str[2:4])

if head > 12 or head == 0:
    if foot <= 12 and foot > 0:
        print('YYMM')
    else:
        print('NA')
elif head > 0:
    if foot > 12 or foot == 0:
        print('MMYY')
    elif foot <= 12:
        print('AMBIGUOUS')
    else:
        print('NA')
else:
    print('NA')
Buggy code:
import numpy as np
import fractions

S = input()
F = int(S[0:2])
E = int(S[2:4])
if(0 < F and F<13 and 0 < E and E<13):
    print("AMBIGUOUS")
elif(0<F and F<13 and E>13):
    print("MMYY")
elif(F>13 and 0<E and E<13):
    print("YYMM")
else
    print("NA")


Fixed code:
import numpy as np
import fractions

S = input()
F = int(S[0:2])
E = int(S[2:4])

if(0 < F and F < 13 ):
    if(0 < E and E<13):
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:#F>=13
    if(0 < E and E < 13):
        print("YYMM")
    else:
        print("NA")
Buggy code:
d=input()
a,b=map([d[:2],d[2:]])
temp=[]
for i in [a,b]:
    if 1 <= i <=12:
        temp.append(2)
    elif 0 <= i <= 99:
        temp.append(1)
    else:
        temp.append(0)

if sum(temp) == 4:
    print('AMBIGUOUS')
elif sum(temp) == 3:
    if temp[0]==2:
        print('MMYY')
    else:
        print('YYMM')
else:
    print('NA')

Fixed code:
d=input()
a,b=map(int, [d[:2],d[2:]])
temp=[]
for i in [a,b]:
    if 1 <= i <=12:
        temp.append(2)
    elif 0 <= i <= 99:
        temp.append(1)
    else:
        temp.append(0)

if sum(temp) == 4:
    print('AMBIGUOUS')
elif sum(temp) == 3:
    if temp[0]==2:
        print('MMYY')
    else:
        print('YYMM')
else:
    print('NA')
Buggy code:
S = input()

mae = int(S[:2])
ato = int(S[2:])

if mae <= 12 and ato <= 12 and mae != "00" and ato != "00":
    print("AMBIGUOUS")
elif mae > 12 and ato <= 12 and ato != "00":
    print("YYMM")
elif mae <= 12 and ato > 12 and mae != "00":
    print("MMYY")
else: 
    print("NA")

Fixed code:
S = input()

mae = int(S[:2])
ato = int(S[2:])

if mae <= 12 and ato <= 12 and mae != 0 and ato != 0:
    print("AMBIGUOUS")
elif mae > 12 and ato <= 12 and ato != 0:
    print("YYMM")
elif mae <= 12 and ato > 12 and mae != 0:
    print("MMYY")
elif mae <= 12 and ato == 0 and mae != 0:
    print("MMYY")
elif mae == 0 and ato <= 12 and ato != 0:
    print("YYMM")
else:
    print("NA")
Buggy code:
S = input()
YYMM = 0
MMYY = 0
start = S[0:2]
end = S[2:4]
tmp1 = int(start)
tmp2 = int(end)
print(tmp1,tmp2)
if(tmp2 <= 12 and tmp2 != 0):
    YYMM = 1
if(tmp1 <= 12 and tmp1 != 0):
    MMYY = 1
if(YYMM == 1 and MMYY == 1):
    print("AMBIGUOUS")
elif(YYMM == 1):
    print("YYMM")
elif(MMYY == 1):
    print("MMYY")
else:
    print("NA")

Fixed code:
S = input()
YYMM = 0
MMYY = 0
start = S[0:2]
end = S[2:4]
tmp1 = int(start)
tmp2 = int(end)
if(tmp2 <= 12 and tmp2 != 0):
    YYMM = 1
if(tmp1 <= 12 and tmp1 != 0):
    MMYY = 1
if(YYMM == 1 and MMYY == 1):
    print("AMBIGUOUS")
elif(YYMM == 1):
    print("YYMM")
elif(MMYY == 1):
    print("MMYY")
else:
    print("NA")
Buggy code:
s=input()
f1=True
f2=True
if int(s[:2])==0 or int(s[:2])>12:
    f1=False
if int(s[2:])==0 or int(s[2:])>12:
    f2=False
if f1 and f2:
    print("AMBIGOUS")
elif f1:
    print("YYMM")
elif f2:
    print("MMYY")
else:
    print("NA")


Fixed code:
s=input()
f1=True
f2=True
if int(s[:2])==0 or int(s[:2])>12:
    f1=False
if int(s[2:])==0 or int(s[2:])>12:
    f2=False
if f1 and f2:
    print("AMBIGUOUS")
elif f1:
    print("MMYY")
elif f2:
    print("YYMM")
else:
    print("NA")
Buggy code:
S = input()

A = 10 * int(S[0]) + int(S[1])
B = 10 * int(S[2]) + int(S[3])

# print(A)
# print(B)

flag_YYMM = 0
flag_MMYY = 0

if 1 <= A and A <= 12 and 1 <= B : 
    flag_MMYY += 1
if 1 <= B and B <= 12 and 1 <= A : 
    flag_YYMM += 1
    
if flag_YYMM == 0 and flag_MMYY == 0 : 
    print("YYMM")
elif flag_YYMM == 0 and flag_MMYY == 1 : 
    print("MMYY")
elif flag_YYMM == 1 and flag_MMYY == 0 : 
    print("YYMM")
elif flag_YYMM == 1 and flag_MMYY == 1 : 
    print("AMBIGUOUS")

Fixed code:
S = input()

A = 10 * int(S[0]) + int(S[1])
B = 10 * int(S[2]) + int(S[3])

# print(A)
# print(B)

flag_YYMM = 0
flag_MMYY = 0

if 1 <= A and A <= 12 : 
    flag_MMYY = 1
if 1 <= B and B <= 12 : 
    flag_YYMM = 1
    
if flag_YYMM == 0 and flag_MMYY == 0 : 
    print("NA")
elif flag_YYMM == 0 and flag_MMYY == 1 : 
    print("MMYY")
elif flag_YYMM == 1 and flag_MMYY == 0 : 
    print("YYMM")
elif flag_YYMM == 1 and flag_MMYY == 1 : 
    print("AMBIGUOUS")
Buggy code:
import sys

S =int(input())
a = S//100
b = S%100
if 1 <= a <= 12 and 1 <= b <= 12 :
    print("AMBIGUOUS")
    sys.exit()

elif 1 <= a <= 12 :
    print("YYMM")
    sys.exit()

elif 1 <= b <= 12 :
    print("MMYY")
    sys.exit()
else : print("NA")


Fixed code:
import sys

S =int(input())
a = S//100
b = S%100
if 1 <= a <= 12 and 1 <= b <= 12 :
    print("AMBIGUOUS")
    sys.exit()

elif 1 <= a <= 12 :
    print("MMYY")
    sys.exit()

elif 1 <= b <= 12 :
    print("YYMM")
    sys.exit()
else : print("NA")
Buggy code:
S = list(map(int, input()))
pre =  S[0] * 10 + S[1]
suf =  S[2] * 10 + S[3]
S2 = [pre, suf]
ans = ''

def YorM (x):
    if x == 0:
        return 'YY'
    elif x >= 1 and x <= 12:
        return 'AMB'
    else:
        return 'YY'

S3 = [YorM(i) for i in S2]

if S3[0] == 'YY':
    if S[1] == 'AMB':
        ans = 'YYMM'
    else:
        ans = 'NA'
if S3[0] == 'AMB':
    if S[1] == 'YY':
        ans = 'MMYY'
    else:
        ans = 'AMBIGUOUS'

print(ans)

Fixed code:
S = list(map(int, input()))
pre =  S[0] * 10 + S[1]
suf =  S[2] * 10 + S[3]
S2 = [pre, suf]
ans = ''

def YorM (x):
    if x == 0:
        return 'YY'
    elif x >= 1 and x <= 12:
        return 'AMB'
    else:
        return 'YY'

S3 = [YorM(i) for i in S2]

if S3[0] == 'YY':
    if S3[1] == 'AMB':
        ans = 'YYMM'
    else:
        ans = 'NA'
if S3[0] == 'AMB':
    if S3[1] == 'YY':
        ans = 'MMYY'
    else:
        ans = 'AMBIGUOUS'

print(ans)
Buggy code:
S = input()
A = int(S[0:2])
B = int(S[2:4])

if 0 < A and A <= 12:
  if 0 < B and B <= 12:
    print(AMBIGUOUS)
  else:
    print(MMYY)
else:
  if 0 < B and B <= 12:
    print(YYMM)
  else:
    print(NA)

Fixed code:
S = input()
A = int(S[0:2])
B = int(S[2:4])

if 0 < A and A <= 12:
  if 0 < B and B <= 12:
    print("AMBIGUOUS")
  else:
    print("MMYY")
else:
  if 0 < B and B <= 12:
    print("YYMM")
  else:
    print("NA")
Buggy code:
S=input()
mozi_1=int(S[0:2])
mozi_2=int(S[2:4])
if 1<=mozi_1<=12 and 1<=mozi_2<=12:print("AMBIGUOUS")
elif 1<=mozi_1<=12 and 13<=mozi_2<=99 or mozi_2==0:print("MMYY")
elif 1<=mozi_2<=12 and 13<=mozi_1<=99 or mozi_1==0:print("YYMM")
else:print("NA")

#print(mozi_1)
#print(mozi_2)


Fixed code:
S=input()
mozi_1=int(S[0:2])
mozi_2=int(S[2:4])
if 1<=mozi_1<=12 and 1<=mozi_2<=12:print("AMBIGUOUS")
elif 1<=mozi_1<=12 and (13<=mozi_2<=99 or mozi_2==0):print("MMYY")
elif 1<=mozi_2<=12 and (13<=mozi_1<=99 or mozi_1==0):print("YYMM")
else:print("NA")

#print(mozi_1)
#print(mozi_2)
Buggy code:
s = input()
l = s[0:2]
r = s[2:]
a = int(l)
b = int(r)
if 0 == a and 0 != b and b <13:
    print('YYMM')
elif 0 != a and a<13 and b ==0:
    print('MMYY')
elif a<13 and b <13:
    print('AMBIGUOUS')
elif a<13 and b>12:
    print('MMYY')
elif a>12 and b <13:
    print('YYMM')
else:
    print('NA')

Fixed code:
s = input()
l = s[0:2]
r = s[2:]
a = int(l)
b = int(r)
if (0 == a or a>12 )and (b >0 and b <13):
    print('YYMM')
elif (a>0 and a<13) and (b ==0 or b>12):
    print('MMYY')
elif (a>0 and a<13) and (b>0 and b <13):
    print('AMBIGUOUS')
else:
    print('NA')
Buggy code:
def main():
  str = input()
  first = str[:2]
  second = str[2:]
  first = change(first)
  second = change(second)
  f_y = 0; s_y = 0;
  f_y = check_y(first)
  s_y = check_y(second)
  if(f_y == 0 and s_y == 0):
    print("AMBIGUOUS")
  elif(f_y == 0 and s_y == 1):
    print("MMYY")
  elif(f_y == 1 and s_y == 0):
    print("YYMM")
  elise:
    print("NA")
    
def change(str):
  if(str[0] == "0"):
    return int(str[1])
  else:
    return int(str)
  
def check_y(num):
  if(num == 0 or num > 12):
    return 1
  else:
    return 0
  
if __name__ == "__main__":
  main()

Fixed code:
def main():
  str = input()
  first = str[:2]
  second = str[2:]
  first = change(first)
  second = change(second)
  f_y = 0; s_y = 0;
  f_y = check_y(first)
  s_y = check_y(second)
  if(f_y == 0 and s_y == 0):
    print("AMBIGUOUS")
  elif(f_y == 0 and s_y == 1):
    print("MMYY")
  elif(f_y == 1 and s_y == 0):
    print("YYMM")
  else:
    print("NA")
    
def change(str):
  if(str[0] == "0"):
    return int(str[1])
  else:
    return int(str)
  
def check_y(num):
  if(num == 0 or num > 12):
    return 1
  else:
    return 0
  
if __name__ == "__main__":
  main()
Buggy code:
s=input()
a=int(s[:2])
b=int(s[2:])
if (a > 12 or a == 0) and (b > 12 or b == 0):
	print("NA")
elif a > 12 or a == 0:
	print("YYMM")
elif b > 12 or b == 0:
	print("MMYY")
else: print("AMBIGUOUTS")

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

Fixed code:
s = input()
s1 = int(s[0])
s2 = int(s[1])
s3 = int(s[2])
s4 = int(s[3])
if(0 < (10 * s1 + s2) < 13 and 0 < (10 * s3 + s4) < 13):
  print('AMBIGUOUS')
elif(0 < (10 * s3 + s4) < 13):
  print('YYMM')
elif(0 < (10 * s1 + s2) < 13):
  print('MMYY')
else:
  print('NA')
Buggy code:
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
import numpy as np
INF = float("inf")
#d = defaultdict(int)
#d = defaultdict(list)
#N = int(input())
#A = list(map(int,input().split()))
#S = list(input())
#S.remove("\n")
#N,M = map(int,input().split())
#S,T = map(str,input().split())
#A = [int(input()) for _ in range(N)]
#S = [input() for _ in range(N)]
#A = [list(map(int,input().split())) for _ in range(N)]
S = list(input())[:-1]
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:
    print("YYMM")
elif b > 12:
    print("MMYY")
else:
    print("AMBIGUOUS")

Fixed code:
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
import numpy as np
INF = float("inf")
#d = defaultdict(int)
#d = defaultdict(list)
#N = int(input())
#A = list(map(int,input().split()))
#S = list(input())
#S.remove("\n")
#N,M = map(int,input().split())
#S,T = map(str,input().split())
#A = [int(input()) for _ in range(N)]
#S = [input() for _ in range(N)]
#A = [list(map(int,input().split())) for _ in range(N)]
S = list(input())[:-1]
a = 10*int(S[0])+int(S[1])
b = 10*int(S[2])+int(S[3])
if (a > 12 or a == 0) and (b > 12 or b == 0):
    print("NA")
elif a > 12 or a == 0:
    print("YYMM")
elif b > 12 or b == 0:
    print("MMYY")
else:
    print("AMBIGUOUS")
Buggy code:
import sys
sys.setrecursionlimit(10**6)

#a = int(input())
#b = list(map(int, input().split()))
#n, m = map(int, input().split())
s = input()
#s,t = input().split()
#a = [int(input()) for _ in range(n)]
#
#readline = sys.stdin.readline
#n,m = [int(i) for i in readline().split()]
#ab = [[int(i) for i in readline().split()] for _ in range(n)]

l = [i for i in range(13)]
l = [str(i) if len(str(i))==2 else '0'+str(i) for i in l]

if s[:2] not in l and s[2:] not in l:
    print('NA')
elif s[:2] not in l and s[2:] in l:
    print('YYMM')
elif s[:2] in l and s[2:] not in l:
    print('MMYY')
else:
    print('AMBIGUOUS')

Fixed code:
import sys
sys.setrecursionlimit(10**6)

#a = int(input())
#b = list(map(int, input().split()))
#n, m = map(int, input().split())
s = input()
#s,t = input().split()
#a = [int(input()) for _ in range(n)]
#
#readline = sys.stdin.readline
#n,m = [int(i) for i in readline().split()]
#ab = [[int(i) for i in readline().split()] for _ in range(n)]

l = [i for i in range(1,13)]
l = [str(i) if len(str(i))==2 else '0'+str(i) for i in l]

if s[:2] not in l and s[2:] not in l:
    print('NA')
elif s[:2] not in l and s[2:] in l:
    print('YYMM')
elif s[:2] in l and s[2:] not in l:
    print('MMYY')
else:
    print('AMBIGUOUS')
Buggy code:
S = list(input())
before = int(S[0] + S[1])
after = int(S[2] + S[3])

if before == 0 or before > 12:
    if after >= 1 and after <= 12:
        print('YYMM')
    else:
        print('NA')
else:
    if after >= 1 and after <= 12:
        print('AMBIGUOS')
    else:
        print('MMYY')

Fixed code:
S = list(input())
before = int(S[0] + S[1])
after = int(S[2] + S[3])

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

Fixed code:
S = input()
a = 0
b = 0
if (S[0] == '0' and S[1] != '0') or (S[0] == '1' and (S[1] == '0' or S[1] == '1' or S[1] == '2')):
  a = 1
if (S[2] == '0' and S[3] != '0') or (S[2] == '1' and (S[3] == '0' or S[3] == '1' or S[3] == '2')):
  b = 1
if a == 1 and b == 1:
  print("AMBIGUOUS")
elif a == 1:
  print("MMYY")
elif b == 1:
  print("YYMM")
else:
  print("NA")
Buggy 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('ANBIGUOUS')
elif (a < 1 or a > 12) and 1 <= b <= 12:
  print('YYMM')
elif 1 <= a <= 12 and (b < 1 or b > 12):
  print('MMYY')
else:
  print('NA')


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

Fixed code:
S = int(input())
a = S // 100
b = S % 100
if (a == 0 and b == 0) or (12 < a and 12 < b) or (12 < a and b == 0) or (12 < b and a == 0):
  print("NA")
elif 0 < a < 13 and 0 < b < 13:
  print("AMBIGUOUS")
elif 0 < a < 13 and b >= 0:
  print("MMYY")
elif 0 < b < 13 and a >= 0:
  print("YYMM")
Buggy code:
s = input()
u = int(s[0] + s[1])
l = int(s[2] + s[3])

if l == 0 or u == 0:
    if 0 < l and l < 13:
        print('YYMM')

    elif 0 < u and u < 13:
        print("MMYY")

elif 0 < l and l < 13:

    if 0 < u and u < 13:
        print('AMBIGUOUS')
    else:
        print("YYMM")


elif 0 < u and u < 13:
    print("MMYY")


Fixed code:
s = input()
u = int(s[0] + s[1])
l = int(s[2] + s[3])

if l == 0 or u == 0:
    if 0 < l and l < 13:
        print('YYMM')

    elif 0 < u and u < 13:
        print("MMYY")
    else:
        print('NA')

elif 0 < l and l < 13:

    if 0 < u and u < 13:
        print('AMBIGUOUS')
    else:
        print("YYMM")

elif 0 < u and u < 13:
    print("MMYY")
else:
    print('NA')
Buggy code:
s = input()

ue = int(s[0]+s[1])
sita = int(s[2]+s[3])

if ue == 0 and sita == 0:
    print('NA')
elif ue == 0 and sita > 0 and sita <= 12:
    print('YYMM')
elif sita == 0 and ue > 0 and ue <= 12:
    print('MMYY')
elif sita <= 12 and ue <= 12:
    print('AMBIGUOUS')
elif sita <= 12 and ue > 12:
    print('YYMM')
elif ue <= 12 and sita > 12:
    print('MMYY')
elif ue > 12 and sita > 12:
    print('NA')

Fixed code:
s = input()

ue = int(s[0]+s[1])
sita = int(s[2]+s[3])

if ue == 0 and sita == 0:
    print('NA')
elif ue == 0 and sita > 0 and sita <= 12:
    print('YYMM')
elif sita == 0 and ue > 0 and ue <= 12:
    print('MMYY')
elif sita > 0 and sita <= 12 and ue > 0 and ue <= 12:
    print('AMBIGUOUS')
elif sita > 0 and sita <= 12 and ue > 12:
    print('YYMM')
elif ue > 0 and ue <= 12 and sita > 12:
    print('MMYY')
elif ue > 12 and sita > 12:
    print('NA')
else:
    print('NA')
Buggy code:
s = input()
s1 = s[:2]
s2 = s[2:]
if int(s1) > 12 and int(s2) > 12 or (s1 == '00' and s2 == '00'):
  print('NA')
elif (int(s1) > 12) or (s1 == '00'):
  print('YYMM')
elif (int(s2) > 12) or (s2 == '00'):
  print('MMYY')
elif int(s1) <= 12 and int(s2) <= 12 and int(s1) > 0 and int(s2) > 0:
  print('AMBIGUOUS')
else:
  print('NA')

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

ab = N[0] + N[1]
cd = N[2] + N[3]

# ab = int(ab)
# cd = int(cd)

if N[0] == 0:
  ab = ab.zfill(2)

if N[2] == 0:
  cd = cd.zfill(2)

# print(ab)
# print(cd)


if ab == "00" or cd == "00":
  print("NA")  

elif int(ab) > 12 and int(cd) > 12:
  print("NA")  

elif 13 > int(ab) > 0 and 13 > int(cd) > 0:
  print("AMBIGUOUS")

elif int(ab) > 12 and int(cd) < 13:
  print("YYMM")

elif 13 > int(ab) > 0 and int(cd) > 12:
  print("MMYY")


Fixed code:
N = input()
N = list(N)
# N = int(N)
# print(N)

ab = N[0] + N[1]
cd = N[2] + N[3]

# ab = int(ab)
# cd = int(cd)

if N[0] == 0:
  ab = ab.zfill(2)

if N[2] == 0:
  cd = cd.zfill(2)

# print(ab)
# print(cd)


if ab == "00" and cd == "00":
  print("NA")  

elif ab == "00" and int(cd) > 12:
  print("NA")  

elif int(ab) > 12 and cd == "00":
  print("NA")  

elif int(ab) > 12 and int(cd) > 12:
  print("NA")  

elif 13 > int(ab) > 0 and 13 > int(cd) > 0:
  print("AMBIGUOUS")

elif ab == "00" and 0 < int(cd) < 13:
  print("YYMM")

elif int(ab) > 12 and int(cd) < 13:
  print("YYMM")

elif 13 > int(ab) > 0 and int(cd) > 12:
  print("MMYY")

elif 0 < int(ab) < 13 and cd =="00":
  print("MMYY")
Buggy code:

def main():
    s = input()
    start = int(s[0:2])
    end = int(s[2:4])
    if start == 0 and (end > 0 and end <= 12):
        print("YYMM")
        return
    if end == 0 and (start > 0 and start <= 12):
        print("MMYY")
        return
    if end == 0 and start == 0:
        print("NA")
        return
    if end <= 12 and (start <= 12):
        print("AMBIGUOUS")
    elif (end <= 12) and start > 12:
        print("YYMM")
    elif end > 12 and (start <= 12):
        print("MMYY")
    elif end > 12 and start > 12:
        print("NA")
    else:
        print("NA")
main()


Fixed code:

def main():
    s = input()
    start = int(s[0:2])
    end = int(s[2:4])
    if start == 0 and (end > 0 and end <= 12):
        print("YYMM")
    elif (start > 0 and start <= 12) and end == 0:
        print("MMYY")
    elif 0 < start <= 12 and 0 < end <= 12:
        print("AMBIGUOUS")
    elif start > 12 and 0 < end <= 12:
        print("YYMM")
    elif 0 < start <= 12 and end > 12:
        print("MMYY")
    else:
        print("NA")
main()
Buggy code:
s=list(input())
s=list(map(int,s))

a=s[0]*10+s[1]
b=s[2]*10+s[3]

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

Fixed code:
s=list(input())
s=list(map(int,s))

a=s[0]*10+s[1]
b=s[2]*10+s[3]

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

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


Fixed code:
s = input()
s1 = int(s[0]+s[1])
s2 = int(s[2]+s[3])

if(s1 >= 1 and s1 <=12):
  if(s2 >= 1 and s2 <=12):
    print('AMBIGUOUS')
  else:
    print('MMYY')
else:
  if(s2 >= 1 and s2 <=12):
    print('YYMM')
  else:
    print('NA')
Buggy code:
def main():
    s  = int(input())
    k = s//100
    t = s%100

    if(k>0 and k<13) and (t>0 and t<13):
        res = "AMBIGUOUS"
    elif(k>0 and k<13) and
        res = "MMYY"
    elif(t>0 and t<13):
        res = "YYMM"
    else:
        res = "NA"
    print(res)






if __name__ == '__main__':
    main()


Fixed code:
def main():
    s  = int(input())
    k = s//100
    t = s%100

    if(k>0 and k<13) and (t>0 and t<13):
        res = "AMBIGUOUS"
    elif(k>0 and k<13):
        res = "MMYY"
    elif(t>0 and t<13):
        res = "YYMM"
    else:
        res = "NA"
    print(res)






if __name__ == '__main__':
    main()
Buggy code:
s = input()
x = int(s[:2])
y = int(s[2:])
if 0<x<=12 and 0<y<=12:
  print('AMBIGUOUS')
elif 0<x<=12:
  print('MMYY')
elif 0<=y<=12:
  print('YYMM')
else:
  print('NA')

Fixed code:
s = input()
x = int(s[:2])
y = int(s[2:])
if 0<x<=12 and 0<y<=12:
  print('AMBIGUOUS')
elif 0<x<=12:
  print('MMYY')
elif 0<y<=12:
  print('YYMM')
else:
  print('NA')
Buggy code:
s = [input()]
f = int(s[0])*10 + int(s[1])
l = int(s[2])*10 + int(s[3])

if 1 <= f <= 12 and 1 <= l <= 12:
  print("AMBIGUOUS")
elif 1 <= f <= 12:
  print("MMYY")
elif 1 <= l <= 12:
  print("YYMM")
else:
  print("NA")


Fixed code:
s = [int(i) for i in input()]
f = s[0]*10 + s[1]
l = s[2]*10 + s[3]

if 1 <= f <= 12 and 1 <= l <= 12:
  print("AMBIGUOUS")
elif 1 <= f <= 12:
  print("MMYY")
elif 1 <= l <= 12:
  print("YYMM")
else:
  print("NA")
Buggy code:
S=input()

F=int(S[:2])
A=int(S[2:])

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

Fixed code:
S=input()

F=int(S[:2])
A=int(S[2:])

if F>12 or F==0:
    if A>12 or A==0:
        print('NA')
    else:
        print('YYMM')
elif A>12 or A==0:
    print('MMYY')
else:
    print('AMBIGUOUS')
Buggy code:
data = list( input() )
n1 = int( data[0] + data[1] )
n2 = int( data [2] + data[3] )

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

Fixed code:
data = list( input() )
n1 = int( data[0] + data[1] )
n2 = int( data [2] + data[3] )

if 1 <= n1 <= 12 and 1 <= n2 <= 12:
    print('AMBIGUOUS')
elif n1 == 0 and n2 == 0:
    print('NA')
elif 1 <= n1 <= 12:
    print('MMYY')
elif 1 <= n2 <= 12:
    print('YYMM')
else:
    print('NA')