ZhenlongDai/ACPR huggingface dataset:
Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
SL = int(S[0:2])
SR = int(S[2:4])

if SL <= 12:
    if SR<=12:
        print("AMBIGUOUS")
    else:
        print("MMYY")
elif SR<=12:
    print("YYMM")
else:
    print("NA")

Failing test case input:
1700

Expected output:
NA

Actual output:
YYMM


Fixed submission (verdict: Accepted):
S = input()
SL = int(S[0:2])
SR = int(S[2:4])

if 1 <=SL <= 12:
    if 1<= SR<=12:
        print("AMBIGUOUS")
    else:
        print("MMYY")
elif 1<=SR<=12:
    print("YYMM")
else:
    print("NA")

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):




def Mcheck(n):
    if(0<n<13):
        return 0
    else:
        return 1
    
def Ycheck(n):
    if(n==0):
        return 1
    else:
        return 0


S=input()
f=int(S[0])*10+int(S[1])
s=int(S[2])*10+int(S[3])

if(Mcheck(f)==0):
    if(Mcheck(s)==0):
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if(Mcheck(f)==0):
        print("YYMM")
    else:
        print("NA")

Failing test case input:
1905

Expected output:
YYMM

Actual output:
NA


Fixed submission (verdict: Accepted):

def Mcheck(n):
    if(0<n<13):
        return 0
    else:
        return 1
    

S=input()
f=int(S[0])*10+int(S[1])
s=int(S[2])*10+int(S[3])

if(Mcheck(f)==0):
    if(Mcheck(s)==0):
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if(Mcheck(s)==0):
        print("YYMM")
    else:
        print("NA")

Problem: p03042
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = int(input())
a = S % 100
b = (S- (S % 100))/100
if  a <= 31 and b <= 12 and b<=31 and a<=12 and a!=0 and b!= 0:
  print("AMBIGUOUS")
elif   a <= 31 and b <= 12 and a!=0 and b!= 0:
  print("MMYY")
elif  b<=31 and a<=12 and a!=0 and b!= 0 :
  print("YYMM")
else :
  print("NA")

Failing test case input:
1055

Expected output:
MMYY


Actual output:
NA


Fixed submission (verdict: Accepted):
S = int(input())
a = S % 100
b = (S- (S % 100))/100
if   b <= 12 and  a<=12 and a!=0 and b!= 0:
       print("AMBIGUOUS")
elif b <= 12 and b!=0:
       print("MMYY")
elif a<=12 and a!=0  :
       print("YYMM")
else :
      print("NA")

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()

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

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


Failing test case input:
3036

Expected output:
NA


Actual output:
YYMM


Fixed submission (verdict: Accepted):
s = input()

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

if (a == 00 or a > 12) and b <= 12 and b >= 1:
  print("YYMM")
elif a <= 12 and a >= 1 and (b == 00 or b > 12):
  print("MMYY")
elif a <= 12 and a >= 1 and b <= 12 and b >= 1:
  print("AMBIGUOUS")
else:
  print("NA")
Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
str     = input()

input   = int(str)

if input < 100:
    if input < 13:
        out = 'YYMM'
    else:
        out = 'NA'
elif input < 1300:
    if input % 100 == 0:
        out = 'MMYY'
    elif input%100 < 13:
        out = 'AMBIGUOUS'
    else:
        out = 'MMYY'
elif input%100==0:
    out = 'NA'
elif input%100<13:
    out = 'YYMM'
else:
    out = 'NA!'
print(out)

Failing test case input:
3341

Expected output:
NA


Actual output:
NA!


Fixed submission (verdict: Accepted):
str     = input()

input   = int(str)

if input < 100:
    if input ==0:
        out = 'NA'
    elif input < 13:
        out = 'YYMM'
    else:
        out = 'NA'
elif input < 1300:
    if input % 100 == 0:
        out = 'MMYY'
    elif input%100 < 13:
        out = 'AMBIGUOUS'
    else:
        out = 'MMYY'
elif input%100==0:
    out = 'NA'
elif input%100<13:
    out = 'YYMM'
else:
    out = 'NA'
print(out)

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = input()
frm = int(a[:2])
lat = int(a[2:])


if frm >= 12 and lat >= 12:
    print('NA')
elif frm <= 12 and lat > 12:
    if 0<frm:
        print('MMYY')
    else:
        print('NA')
        
    
elif frm > 12 and  lat <= 12:
    if lat > 0:
        print('YYMM')
    else:
        print('NA')    
else:
    print('AMBIGUOUS')

Failing test case input:
1291

Expected output:
MMYY


Actual output:
NA


Fixed submission (verdict: Accepted):
a = input()
frm = int(a[:2])
lat = int(a[2:])


if frm > 12 and lat > 12:
    print('NA')
elif frm <= 12 and lat > 12:
    if 0<frm:
        print('MMYY')
    else:
        print('NA')    
elif frm > 12 and  lat <= 12:
    if lat > 0:
        print('YYMM')
    else:
        print('NA')
elif frm <= 12 and lat==0:
    if frm >0:
        print('MMYY')
    else:
        print('NA')
elif frm == 0 and  lat <= 12:
    if lat >0:
        print('YYMM')
    else:
        print('NA')
else:
    print('AMBIGUOUS')

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def can_be_month(n):
    if 0 < int(n) < 13:
        return True
    return False


S = input()

if can_be_month(S[:2]) or can_be_month(S[2:]) is False:
    print('NA')
elif can_be_month(S[:2]) and can_be_month(S[2:]):
    print('AMBIGUOUS')
elif can_be_month(S[:2]):
    print('MMYY')
elif can_be_month(S[2:]):
    print('YYMM')


Failing test case input:
1211

Expected output:
AMBIGUOUS


Actual output:
NA


Fixed submission (verdict: Accepted):
def can_be_month(n):
    if 0 < int(n) < 13:
        return True
    return False


S = input()

if can_be_month(S[:2]) and can_be_month(S[2:]):
    print('AMBIGUOUS')
elif can_be_month(S[:2]):
    print('MMYY')
elif can_be_month(S[2:]):
    print('YYMM')
else:
    print('NA')
Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A = str(input())
AC = list(A)
AB = int(A[0] + A[1])
AC = int(A[2] + A[3])

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

Failing test case input:
1701

Expected output:
YYMM


Actual output:
MMYY


Fixed submission (verdict: Accepted):
A = str(input())
AC = list(A)
AB = int(A[0] + A[1])
AC = int(A[2] + A[3])

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

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
num1 = S[:2]
num2 = S[2:4]
if 0 < int(num1) <= 12 and 0 < int(num2) <= 12:
    print("AMBIGUOUS")
elif  12 < int(num1) < 31 and 0 < int(num2) <= 12:
    print("YYMM")
elif 0 < int(num1) <= 12 and 12 < int(num2) < 31:
    print("MMYY")
elif int(num1) > 12 and int(num2) > 12:
    print("NA")
else:
    print("NA")

Failing test case input:
4704

Expected output:
YYMM


Actual output:
NA


Fixed submission (verdict: Accepted):
S = input()
num1 = S[:2]
num2 = S[2:]
if 0 < int(num1) <= 12 and 0 < int(num2) <= 12:
    print("AMBIGUOUS")
elif 0 <= int(num1) <= 99 and 0 < int(num2) <= 12:
    print("YYMM")
elif 0 < int(num1) <= 12 and 0 <= int(num2) <= 99:
    print("MMYY")
else:
    print("NA")

Problem: p03042
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import sys
input = lambda: sys.stdin.readline().rstrip()

S = input()

f = int(S[:2])
s = int(S[2:])

if (f <= 0 and s > 12) or (f > 12 and s <= 0):
    print("NA")
elif f > 12 and s <= 12:
    print("YYMM")
elif f <= 12 and s > 12:
    print("MMYY")
elif f <= 12 and s <= 12:
    print("AMBIGUOUS") 

Failing test case input:
3459

Expected output:
NA


Actual output:

Fixed submission (verdict: Accepted):
import sys
input = lambda: sys.stdin.readline().rstrip()

S = input()

f = int(S[:2])
s = int(S[2:])

if (f <= 0 and s > 12) or (f > 12 and s <= 0) or (f <= 0 and s <= 0) or (f > 12 and s > 12):
    print("NA")  
elif (f > 12 and 0 < s <= 12) or (f <= 0 and 0 < s <= 12):
    print("YYMM")
elif (0 < f <= 12 and s > 12) or (0 < f <= 12 and s <= 0):
    print("MMYY")
elif 0 < f <= 12 and 0 < s <= 12:
    print("AMBIGUOUS")

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

s = input()
sa = int(s[:2])
sb = int(s[3:])

if sa >= 1 and sa <= 12 and sb >= 1 and sb <= 12:
    print('AMBIGUOUS')
    exit()
if sa > 12 and sb > 12:
    print('NA')
    exit()
if sa >= 1 and sa <= 12 and sb > 12:
    print('MMYY')
    exit()
if sa > 12 and sb >= 1 and sb <= 12:
    print('YYMM')
    exit()


Failing test case input:
2233

Expected output:
NA


Actual output:
YYMM


Fixed submission (verdict: Accepted):

s = input()
sa = int(s[:2])
sb = int(s[2:])

if sa >= 1 and sa <= 12 and sb >= 1 and  sb <= 12:
    print('AMBIGUOUS')
    exit()
else:
    if sa >= 1 and sa <= 12:
        print('MMYY')
        exit()
    if sb >= 1 and sb <= 12:
        print('YYMM')
        exit()

print('NA')
Problem: p03042
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s = input()
a, b = int(s[0:2]), int(s[2:4])
if 1 <= a <= 12 and 1 <= b <= 12:
    print("AMBIGUOUS")
elif 1 <= a <= 12:
    print("MMYY")
elif 1 <= b <= 12:
    print("YYMM")
else:
    print("NO")


Failing test case input:
2382

Expected output:
NA


Actual output:
NO


Fixed submission (verdict: Accepted):
s = input()
a, b = int(s[0:2]), int(s[2:4])
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")

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A = str(input())
B =int(A[0:1])
C =int(A[2:4])
print(A)
print(B)
print(C)

if B >=1 and B<=12:
    B_mm = True
else:
    B_mm = False

if C >=1 and C<=12:
    C_mm = True
else:
    C_mm = False

if B >=0 and B<=99:
    B_yy = True
else:
    B_yy = False

if C >=0 and C<=99:
    C_yy = True
else:
    C_yy = False

if B_yy == True and C_mm == True and B_mm ==True and C_yy ==True :
    print('AMBIGUOUS')
elif B_yy == True and C_mm == True:
    print('YYMM')
elif  C_yy == True and B_mm == True:
    print('YYMM')
else:
    print('NA')




Failing test case input:
3034

Expected output:
NA


Actual output:
3034
3
34
YYMM


Fixed submission (verdict: Accepted):


A = str(input())
B =int(A[:2])
C =int(A[2:4])


if B >=1 and B<=12:
    B_mm = True
else:
    B_mm = False

if C >=1 and C<=12:
    C_mm = True
else:
    C_mm = False

if B >=0 and B<=99:
    B_yy = True
else:
    B_yy = False

if C >=0 and C<=99:
    C_yy = True
else:
    C_yy = False

if B_yy == True and C_mm == True and B_mm ==True and C_yy ==True:
    print('AMBIGUOUS')
elif B_yy == True and C_mm == True:
    print('YYMM')
elif C_yy == True and B_mm == True:
    print('MMYY')
else:
    print('NA')

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
print("AMBIGUOUS" if int((s[:2]))>0 and int((s[:2]))<13 and int(s[2:])>0 and int(s[2:])<13 else "YYMM" if int(s[2:])<13 else "MMYY"if int(s[:2])<13 else "NA")

Failing test case input:
1700

Expected output:
NA

Actual output:
YYMM


Fixed submission (verdict: Accepted):
s = input()
print("AMBIGUOUS" if int((s[:2]))>0 and int((s[:2]))<13 and int(s[2:])>0 and int(s[2:])<13 else "YYMM" if int(s[2:])<13 and s[2:]!="00" else "MMYY"if int(s[:2])<13 and s[:2]!="00" else "NA")

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
z = input()
x = int(z[:2])
y = int(z[2:])

if ( x == 0 and y == 0) or ( x> 12 and y > 12):
      print("NA")
elif (x <= 12):
      if (y<= 12):
            print("AMBIGUOUS")
      else:
            print("MMYY")
else:
      print("YYMM")


Failing test case input:
1700

Expected output:
NA

Actual output:
YYMM


Fixed submission (verdict: Accepted):
z = input()
x = int(z[:2])
y = int(z[2:])

if (0<x <= 12):
      if (0<y<= 12):
            print("AMBIGUOUS")
      else:
            print("MMYY")
elif (0<y <= 12):
      if (0<x<= 12):
            print("AMBIGUOUS")
      else:
            print("YYMM")
else:
      print("NA")
Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

S = list(input())

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



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

Failing test case input:
3813

Expected output:
NA


Actual output:

Fixed submission (verdict: Accepted):

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")

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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 and y < 13:
  print('YYMM')
elif x < 13 and y >= 13:
  print('MMYY')
else:
  print('NA')


Failing test case input:
1700

Expected output:
NA

Actual output:
YYMM


Fixed submission (verdict: Accepted):
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')

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')


Failing test case input:
1211

Expected output:
AMBIGUOUS


Actual output:
ANBIGUOUS


Fixed submission (verdict: Accepted):
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')

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
if 0<int(s[:2])<=12 and 0<int(s[2:])<=12:
    print("AMBIGUOUS")
elif 0<int(s[:2])<=12:
    print("YYMM")
elif 0<int(s[2:])<=12:
    print("MMYY")
else:
    print("NA")

Failing test case input:
1055

Expected output:
MMYY


Actual output:
YYMM


Fixed submission (verdict: Accepted):
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")
Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

S = input()

A = int(''.join(S[0:2]))
B = int(''.join(S[2:4]))

if S[0:2] == '00' or S[2:4] == '00':
    if 0 < A <= 12:
        print('MMYY')

    elif 0 < B <= 12:
        print('YYMM')
    else:
        print('NA')

else:
    if 12 < A and 12 < B:
        print('NA2')

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

    elif 0 <= A and A <= 12:
        print('MMYY')

Failing test case input:
2064

Expected output:
NA


Actual output:
NA2


Fixed submission (verdict: Accepted):
import sys

S = input()

A = int(''.join(S[0:2]))
B = int(''.join(S[2:4]))

if S[0:2] == '00' or S[2:4] == '00':
    if 0 < A <= 12:
        print('MMYY')

    elif 0 < B <= 12:
        print('YYMM')
    else:
        print('NA')

else:
    if 12 < A and 12 < B:
        print('NA')

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

    elif 0 <= A and A <= 12:
        print('MMYY')

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
lst = list(input())
lst1 = []
lst1.append(lst[0]+lst[1])
lst1.append(lst[2]+lst[3])

if (int(lst1[0]) >=13 and int(lst1[1]) >=13) or (int(lst1[0]) >=13 and int(lst1[1]) =="00") or (lst1[0] =="00" and int(lst1[1]) >=13) or (lst1[0] =="00" and lst1[1] == "00"):
  print("NA")
  
elif (0<int(lst1[0])<=12 and 0<int(lst1[1])<=12):
      print("AMBIGUOUS")
      
elif 0<int(lst1[0]) <=12 and int(lst1[1])>=13:
      print("MMYY")
elif 0<int(lst1[1])<=12 and int(lst1[0])>=13:
      print("YYMM")

Failing test case input:
1700

Expected output:
NA

Actual output:

Fixed submission (verdict: Accepted):
lst = list(input())
lst1 = []
lst1.append(lst[0]+lst[1])
lst1.append(lst[2]+lst[3])

if (int(lst1[0]) >=13 and int(lst1[1]) >=13) or (int(lst1[0]) >=13 and lst1[1] =="00") or (lst1[0] =="00" and int(lst1[1]) >=13) or (lst1[0] =="00" and lst1[1] == "00"):
  print("NA")
  
elif (0<int(lst1[0])<=12 and 0<int(lst1[1])<=12):
      print("AMBIGUOUS")
      
elif 0<int(lst1[0]) <=12:
      print("MMYY")
elif 0<int(lst1[1])<=12:
      print("YYMM")

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = str(input())
S1 = list(S)
S2 = (10*int(S[0])+int(S[1]),10*int(S[2])+int(S[3]))
if S2[0] <= 12 and S2[1] <= 12:
    print('AMBIGUOUS')
elif S2[0] <= 12 and S2[1] > 12:
    print('MMYY')
elif S2[0] > 12 and S2[1] <= 12:
    print('YYMM')
else:
    print('NA')

Failing test case input:
1700

Expected output:
NA

Actual output:
YYMM


Fixed submission (verdict: Accepted):
S = str(input())
S1 = list(S)
S2 = (10*int(S[0])+int(S[1]),10*int(S[2])+int(S[3]))
if 0 < S2[0] <= 12:
    if 0 < S2[1] <= 12:
        print('AMBIGUOUS')
    elif S2[1] == 0 or S2[1] > 12:
        print('MMYY')
elif S2[0] == 0 or S2[0] > 12:
    if 0 < S2[1] <= 12:
        print('YYMM')
    elif S2[1] == 0 or S2[1] > 12:
        print('NA')
Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = str(input())
if s[0] == "0" and s[1] == "0" and int(s[2]+s[3]) > 12:
    print("NA")
elif s[2] == "0" and s[3] == "0" and int(s[0]+s[1]) > 12:
    print("NA")
elif int(s[0]+s[1]) > 12 and int(s[2]+s[3]) > 12:
    print("NA")
elif int(s[0]+s[1]) > 12 and int(s[2]+s[3]) < 12:
    print("YYMM")
elif int(s[2]+s[3]) > 12 and int(s[0]+s[1]) < 12:
    print("MMYY")
else:
    print("AMBIGUOUS")

Failing test case input:
1297

Expected output:
MMYY


Actual output:
AMBIGUOUS


Fixed submission (verdict: Accepted):
s = str(input())
if s[0] == "0" and s[1] == "0" and int(s[2]+s[3]) > 12:
    print("NA")
elif s[2] == "0" and s[3] == "0" and int(s[0]+s[1]) > 12:
    print("NA")
elif s == "0000":
    print("NA")
elif int(s[0]+s[1]) > 12 and int(s[2]+s[3]) > 12:
    print("NA")
elif s[0] == "0" and s[1] == "0":
    print("YYMM")
elif s[2] == "0" and s[3] == "0":
    print("MMYY")
elif int(s[0]+s[1]) > 12 and int(s[2]+s[3]) <= 12:
    print("YYMM")
elif int(s[2]+s[3]) > 12 and int(s[0]+s[1]) <= 12:
    print("MMYY")
else:
    print("AMBIGUOUS")

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
a=int(s[:2])
b=int(s[3:])

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

Failing test case input:
1016

Expected output:
MMYY


Actual output:
AMBIGUOUS


Fixed submission (verdict: Accepted):
s=input()
a=int(s[:2])
b=int(s[2:])

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

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    s = list(input())
    a = int(s[0] + s[1])
    b = int(s[2] + s[3])
 
    if 1 <= a and a <= 12 and 1 <= b and b <= 12:
        return "AMBIGUOUS"
    
    if (a == 0 or a >= 12) and 1 <= b and b <= 12:
        return "YYMM"
    
    if a <= 1 and a <= 12 and (b >= 12 or b == 0):
        return "MMYY"
 
    return "NA"
 
print(main())

Failing test case input:
1016

Expected output:
MMYY


Actual output:
NA


Fixed submission (verdict: Accepted):
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())
Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
s1 = int(s[0]+s[1])
s2 = int(s[2]+s[3])
if s1 <= 12:
    if s2 <= 12:
        print('AMBIGUOUS')
    else:
        print('MMYY')
elif s2 <= 12:
    print('YYMM')
else:
    print('NA')


Failing test case input:
1700

Expected output:
NA

Actual output:
YYMM


Fixed submission (verdict: Accepted):
s = input()
s1 = int(s[0]+s[1])
s2 = int(s[2]+s[3])
if s1 == s2 == 0:
    print('NA')
elif s1 <= 12 and s2 <= 12 and s1 >= 1 and s2 >= 1:
    print('AMBIGUOUS')
elif s1 <= 12 and s1 >= 1:
    print('MMYY')
elif s2 <= 12 and s2 >= 1:
    print('YYMM')
else:
    print('NA')

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
a = int(s[:2])
b = int(s[2:])

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

Failing test case input:
2233

Expected output:
NA


Actual output:
MMYY


Fixed submission (verdict: Accepted):
s = input()
a = int(s[:2])
b = int(s[2:])

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

Problem: p03042
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s = input()

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

if former==0 or later==0:
  print("NA")
elif former<13 and later<13:
  print("AMBIGUOUS")
elif former<13:
  print("MMYY")
else:
  print("YYMM")

Failing test case input:
2382

Expected output:
NA


Actual output:
YYMM


Fixed submission (verdict: Accepted):
s = input()

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


if 0<former<13 and 0<later<13:
  print("AMBIGUOUS")
elif 0<former<13:
  print("MMYY")
elif 0<later<13:
  print("YYMM")
else:
  print("NA")

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
s1=int(s[0:2])
s2=int(s[2:4])
if (1<=s1<=99 and 1<=s2<=12) and (1<=s2<=99 and 1<=s1<=12):
    print('AMBIGUOUS')
elif (1<=s1<=99 and 1<=s2<=12):
    print('YYMM')    
elif (1<=s1<=99 and 1<=s2<=12):
    print('MMYY')    
else:
    print('NA')        

Failing test case input:
1179

Expected output:
MMYY


Actual output:
NA


Fixed submission (verdict: Accepted):
s=input()
s1=int(s[0:2])
s2=int(s[2:4])
if (0<=s1<=99 and 1<=s2<=12) and (0<=s2<=99 and 1<=s1<=12):
    print('AMBIGUOUS')
elif (0<=s1<=99 and 1<=s2<=12):
    print('YYMM')    
elif (0<=s2<=99 and 1<=s1<=12):
    print('MMYY')    
else:
    print('NA')
Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

s = input()
s_up = int(s[0] + s[1])
s_down = int(s[2] + s[3])

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

Failing test case input:
1700

Expected output:
NA

Actual output:
YYMM


Fixed submission (verdict: Accepted):

s = input()
s_up = int(s[0] + s[1])
s_down = int(s[2] + s[3])

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

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
am = s[0]+s[1]
pm = s[2]+s[3]
p = ["01","02","03","04","05","06","07","08","09","10","11","12"]
if am in p and pm in p:
    print("AMBIGUOUGS")
elif am in p and pm not in p:
    print("MMYY")
elif am not in p and pm in p:
    print("YYMM")
elif am not in p and pm not in p:
    print("NA")

Failing test case input:
1211

Expected output:
AMBIGUOUS


Actual output:
AMBIGUOUGS


Fixed submission (verdict: Accepted):
s = input()
am = s[0]+s[1]
pm = s[2]+s[3]
p = ["01","02","03","04","05","06","07","08","09","10","11","12"]
if am in p and pm in p:
    print("AMBIGUOUS")
elif am in p and pm not in p:
    print("MMYY")
elif am not in p and pm in p:
    print("YYMM")
elif am not in p and pm not in p:
    print("NA")

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A=input()
S=[int(A[i:i+2]) for i in range(0,len(A),2)]
if 0<=S[0] and S[0]<=12:
    if 0<=S[1] and S[1]<=12:
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if 0<=S[1] and S[1]<=12:
        print('MMYY')
    else:
        print('NA')

Failing test case input:
4704

Expected output:
YYMM


Actual output:
MMYY


Fixed submission (verdict: Accepted):
A=input()
S=[int(A[i:i+2]) for i in range(0,len(A),2)]
if 1<=S[0] and S[0]<=12:
    if 1<=S[1] and S[1]<=12:
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if 1<=S[1] and S[1]<=12:
        print('YYMM')
    else:
        print('NA')

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
l = s[0]+s[1]
r = s[2]+s[3]
mm = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12']
zero = ['00']
if l == zero or r == zero:
    print('NA')
elif mm.count(l) == 1 and mm.count(r) == 1:
    print('AMBIGIUOUS')
elif mm.count(l) == 1 and mm.count(r) != 1:
    print('MMYY')
elif mm.count(l) != 1 and mm.count(r) == 1:
    print('YYMM')
else:
    print('NA')

Failing test case input:
1211

Expected output:
AMBIGUOUS


Actual output:
AMBIGIUOUS


Fixed submission (verdict: Accepted):
s = input()
l = s[0]+s[1]
r = s[2]+s[3]
mm = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12']
if mm.count(l) == 1 and mm.count(r) == 1:
    print('AMBIGUOUS')
elif mm.count(l) == 1 and mm.count(r) != 1:
    print('MMYY')
elif mm.count(l) != 1 and mm.count(r) == 1:
    print('YYMM')
else:
    print('NA')
Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
l=s[0]+s[2]
m=s[1]+s[3]
month=['01','02','03','04','05','06','07','08','09','10','11','12']
if month.count(l)==1 and month.count(m)==1:
    print('AMBIGOUS')
elif month.count(l)==1 and month.count(m)==0:
    print('MMYY')
elif month.count(m)==1 and month.count(l)==0:
    print('YYMM')
else:
    print('NA')

Failing test case input:
2131

Expected output:
NA


Actual output:
YYMM


Fixed submission (verdict: Accepted):
s=input()
l=s[0]+s[1]
m=s[2]+s[3]
month=['01','02','03','04','05','06','07','08','09','10','11','12']
if month.count(l)==1 and month.count(m)==1:
    print('AMBIGUOUS')
elif month.count(l)==1 and month.count(m)==0:
    print('MMYY')
elif month.count(m)==1 and month.count(l)==0:
    print('YYMM')
else:
    print('NA')

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()

S_zen =int(S[0:2])
S_go = int(S[2:4])

judge_list_MM = [1+i for i in range(12)]

print(judge_list_MM)


if S_zen ==0 or S_go ==0:
    print("NA")
if S_zen in judge_list_MM :
    print("MMYY")
elif S_go in judge_list_MM :
    print("YYMM")
elif S_zen in judge_list_MM and S_go in judge_list_MM :
    print("AMBIGUOUS")


Failing test case input:
9651

Expected output:
NA


Actual output:
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]


Fixed submission (verdict: Accepted):
S = input()

S_zen =int(S[0:2])
S_go = int(S[2:4])

judge_list_MM = [1+i for i in range(12)]



if S_zen in judge_list_MM and S_go in judge_list_MM :
    print("AMBIGUOUS")
elif S_go in judge_list_MM :
    print("YYMM")
elif S_zen in judge_list_MM :
    print("MMYY")
else :
    print("NA")

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
r = 'NA', 'MMYY', 'YYMM', 'AMBIGUOUS'
f = lambda x: 1 <= int(x) <= 12 
print(r[f(s[:2]) + 2 * f(s[3:])])


Failing test case input:
2382

Expected output:
NA


Actual output:
YYMM


Fixed submission (verdict: Accepted):
s=input()
r = 'NA', 'MMYY', 'YYMM', 'AMBIGUOUS'
f = lambda x: 1 <= int(x) <= 12 
print(r[f(s[:2]) + 2 * f(s[2:])])

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
if 1 <= int(S[:1]) <= 12 and 1 <= int(S[2:]) <= 12:
  print("AMBIGUOUS")
elif 1 <= int(S[:1]) <= 12:
  print("MMYY")
elif 1 <= int(S[2:]) <= 12:
  print("YYMM")
else:
  print("NA")

Failing test case input:
2340

Expected output:
NA


Actual output:
MMYY


Fixed submission (verdict: Accepted):
S = input()
if 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")
Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

s = input()
op = ''
first = s[0:2]
second = s[2:4]
if (0 < int(first) <= 12):
	op += 'MM'
else:
	op += 'YY'
if (0 < int(second) <= 12):
	op += 'MM'
else:
	op += 'YY'

if (len(s) != 4 or op == 'MMMM'):
	op = 'NA'
elif (op == 'MMMM'):
	op = 'AMBIGUOUS'
elif (second == '00' or first == '00'):
	if ((second == '00' and first == '00') or int(second) > 12 or int(first) > 12):
		op = 'NA'
print(op)
	


Failing test case input:
2340

Expected output:
NA


Actual output:
YYYY


Fixed submission (verdict: Accepted):

s = input()
op = ''
first = s[0:2]
second = s[2:4]
if (0 < int(first) <= 12):
	op += 'MM'
else:
	op += 'YY'
if (0 < int(second) <= 12):
	op += 'MM'
else:
	op += 'YY'

if (len(s) != 4):
	op = 'NA'
elif (op == 'MMMM'):
	op = 'AMBIGUOUS'
elif (op == 'YYYY'):
	if ((second == '00' and first == '00') or int(second) > 12 or int(first) > 12):
		op = 'NA'
print(op)

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
ym = 0
my = 0

s = input()


if int(s[2:]) <= 12:
    ym = 1

if int(s[:2]) <= 12:
    my = 1

if int(s[:2]) == 0 or int(s[2:]) == 0:
    ym = 0
    my = 0
    print('NA')

if ym == 1 and my == 1:
    print('AMBIGUOUS')

if ym == 1 and my == 0:
    print('YYMM')

if ym == 0 and my == 1:
    print('MMYY')

Failing test case input:
4736

Expected output:
NA


Actual output:

Fixed submission (verdict: Accepted):
ym = 0
my = 0

s = input()

hi = int(s[2:])
lo = int(s[:2])


def isym(l):
    if l == 0:
        return False
    if l <= 12:
        return True
    else:
        return False


ym = 0
my = 0
if isym(hi):
    ym = 1
if isym(lo):
    my = 1

if ym == 1 and my == 1:
    print('AMBIGUOUS')
if ym == 1 and my == 0:
    print('YYMM')
if ym == 0 and my == 1:
    print('MMYY')
if ym == 0 and my == 0:
    print('NA')

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
if int(s[0:2]) == 0 or int(s[2:4]) == 0:
  print("NA")
elif 0 < int(s[0:2]) <= 12 and 0 < int(s[2:4]) <= 12 :
  print("AMBIGUOUS")
elif 13 < int(s[0:2]):
  print("YYMM")
else:
  print("MMYY")
  

Failing test case input:
3984

Expected output:
NA


Actual output:
YYMM


Fixed submission (verdict: Accepted):
s = input()

if 0 < int(s[0:2]) <= 12 and 0 < int(s[2:4]) <= 12 :
  print("AMBIGUOUS")
elif (12 < int(s[0:2]) or int(s[0:2]) == 0) and  0 < int(s[2:4]) <= 12:
  print("YYMM")
elif 0 < int(s[0:2]) <= 12 and (12 < int(s[2:4]) or int(s[2:4]) == 0):
  print("MMYY")
else:
  print("NA")
Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
first = int(S[:2])
second = int(S[2:])
if((first>12 or first==0) and (second>12 or second==0)):
    print("NA")
elif(first<=12 and (second>12 or second==0)):
    print("MMYY")
elif(second<=12 and (first>12 or first==0)):
    print("YYMM")
else:
    print("AMBIGIOUS")

Failing test case input:
0112

Expected output:
AMBIGUOUS

Actual output:
AMBIGIOUS


Fixed submission (verdict: Accepted):
S = input()
first = int(S[:2])
second = int(S[2:])
if((first>12 or first==0) and (second>12 or second==0)):
    print("NA")
elif(first<=12 and (second>12 or second==0)):
    print("MMYY")
elif(second<=12 and (first>12 or first==0)):
    print("YYMM")
else:
    print("AMBIGUOUS")

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')

Failing test case input:
1701

Expected output:
YYMM


Actual output:
NA


Fixed submission (verdict: Accepted):
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')

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
ans=''
if 0<int(s[:2])<=12 and 0<int(s[2:])<=12:
  ans='AMBIGUOUS'
elif int(s[:2])>12 or int(s[:2])==0 and 0<int(s[2:])<=12:
  ans='YYMM'
elif 0<int(s[:2])<=12 and int(s[2:])>12 or int(s[2:])==0:
  ans='MMYY'
else:
  ans='NA'
print(ans)

Failing test case input:
7595

Expected output:
NA


Actual output:
YYMM


Fixed submission (verdict: Accepted):
s=input()
ans=''
if 0<int(s[:2])<=12 and 0<int(s[2:])<=12:
  ans='AMBIGUOUS'
elif 0<int(s[2:])<=12:
  if int(s[:2])>12 or int(s[:2])==0:
    ans='YYMM'
elif 0<int(s[:2])<=12:
  if int(s[2:])>12 or int(s[2:])==0:
    ans='MMYY'
else:
  ans='NA'
print(ans)

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = input()
if int(s[0:2]) == 0 or int(s[2:4]) == 0:
  print("NA")
elif 0 < int(s[0:2]) <= 12 and 0 < int(s[2:4]) <= 12 :
  print("AMBIGUOUS")
elif 12 < int(s[0:2]) and int(s[2:4]) < 12:
  print("YYMM")
else:
  print("MMYY")
  

Failing test case input:
2670

Expected output:
NA


Actual output:
MMYY


Fixed submission (verdict: Accepted):
s = input()

if 0 < int(s[0:2]) <= 12 and 0 < int(s[2:4]) <= 12 :
  print("AMBIGUOUS")
elif (12 < int(s[0:2]) or int(s[0:2]) == 0) and  0 < int(s[2:4]) <= 12:
  print("YYMM")
elif 0 < int(s[0:2]) <= 12 and (12 < int(s[2:4]) or int(s[2:4]) == 0):
  print("MMYY")
else:
  print("NA")
Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

def main():
    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 and A <= 12 and (0 == B or 12 < B):
        print("YYMM")

    elif 1 <= B and B <= 12 and (0 == A or 12 < A):
        print("MMYY")

    else:
        print("NA")


if __name__ == "__main__":
    main()


Failing test case input:
6210

Expected output:
YYMM


Actual output:
MMYY


Fixed submission (verdict: Accepted):

def main():
    S = input()

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

    if A != 0 and B <= 12 and B != 0 and A <= 12:
        print("AMBIGUOUS")

    elif (A != 0 and B <= 12) and B != 0:
        print("YYMM")

    elif (B != 0 and A <= 12) and A != 0:
        print("MMYY")

    elif (A == 0 and 1 <= B and B <= 12):
        print("YYMM")

    elif (B == 0 and 1 <= A and A <= 12):
        print("MMYY")

    else:
        print("NA")


if __name__ == "__main__":
    main()

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s = list(input())

a = int(s[0]+s[1])
b = int(s[2]+s[3])

if  1<=a<=12 and 1<=b<=12:
  print('AMBIGUOUS')
elif a>12 and 1<=b<=12:
  print('YYMM')
elif b>12 and 1<=a<=12:
  print('MMYY')
elif a>12 and b>12:
  print('NA')
elif a<0 and b<0:
  print('NA')

Failing test case input:
1700

Expected output:
NA

Actual output:

Fixed submission (verdict: Accepted):
s = list(input())

a = int(s[0]+s[1])
b = int(s[2]+s[3])

if  1<=a<=12 and 1<=b<=12:
  print('AMBIGUOUS')
elif (a>12 or a==0) and 1<=b<=12:
  print('YYMM')
elif (b>12 or b==0) and 1<=a<=12:
  print('MMYY')
elif (a>12 or a==0) and (b>12 or b==0):
  print('NA')

Problem: p03042
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
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")

Failing test case input:
4704

Expected output:
YYMM


Actual output:
AMBIGUOUS


Fixed submission (verdict: Accepted):
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")

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
s=input()
s1=int(s[:2])
s2=int(s[2:])

if 1<=s1<=12 and 1<=s2<=12:
  print("AMBIGUOUS")
elif 0<=s1<=99 and 1<=s2<=12:
  print("YYMM")
elif 1<=s1<=12 and 0<=s2<=99:
  print("MYYY")
else:
  print("NA")

Failing test case input:
1291

Expected output:
MMYY


Actual output:
MYYY


Fixed submission (verdict: Accepted):
s=input()
s1=int(s[:2])
s2=int(s[2:])

if 1<=s1<=12 and 1<=s2<=12:
  print("AMBIGUOUS")
elif 0<=s1<=99 and 1<=s2<=12:
  print("YYMM")
elif 1<=s1<=12 and 0<=s2<=99:
  print("MMYY")
else:
  print("NA")
Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S=input()
if 1<=int(S[:2])<=12 and (13<=int(S[2:]) or int(S[2:]))==0:
    print("MMYY")
elif 1<=int(S[2:])<=12 and (13<=int(S[:2]) or int(S[:2]))==0:
    print("YYMM")
elif 1<=int(S[2:])<=12 and 1<=int(S[:2])<=12:
    print("AMBIGUOUS")
elif (13<=int(S[2:]) or int(S[2:]))==0 and (13<=int(S[:2]) or int(S[:])==0):
    print("NA")

Failing test case input:
6757

Expected output:
NA


Actual output:

Fixed submission (verdict: Accepted):
S=input()
if 1<=int(S[:2])<=12 and (13<=int(S[2:]) or int(S[2:])==0):
    print("MMYY")
elif 1<=int(S[2:])<=12 and (13<=int(S[:2]) or int(S[:2])==0):
    print("YYMM")
elif 1<=int(S[2:])<=12 and 1<=int(S[:2])<=12:
    print("AMBIGUOUS")
elif (13<=int(S[2:]) or int(S[2:])==0) and (13<=int(S[:2]) or int(S[:])==0):
    print("NA")

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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])




result1 = Check_Year(head_chrs) + Check_Month(tail_chrs)


result2 = Check_Year(tail_chrs) + Check_Month(head_chrs)


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')



Failing test case input:
0112

Expected output:
AMBIGUOUS

Actual output:
MMYY


Fixed submission (verdict: Accepted):
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])

tail_chrs = int(input_data[2] + input_data[3])





result1 = Check_Year(head_chrs) + Check_Month(tail_chrs)


result2 = Check_Year(tail_chrs) + Check_Month(head_chrs)


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')
Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def judge(s):
    if int(s[0]) == 0:
        if int(s[0]) > 0:
            return 1
        else:
            return 0
    elif int(s[0]) == 1:
        if int(s[1]) <=2:
            return 1
        else:
            return 0
    else:
        return 0

S = input()
tmp = list(S)
first = ''.join([tmp[0],tmp[1]])
second = ''.join([tmp[2],tmp[3]])

flag1 = -1
flag2 = -1


flag1 = judge(second)


flag2 = judge(first)


if flag1 ==1 and flag2 == 1:
    print("AMBIGUOUS")
elif flag1 == 1 and flag2 == 0:
    print("YYMM")
elif flag1 == 0 and flag2 == 1:
    print("MMYY")
else:
    print("NA")

Failing test case input:
2206

Expected output:
YYMM


Actual output:
NA


Fixed submission (verdict: Accepted):
def judge(s):
    if int(s[0]) == 0:
        if int(s[1]) > 0:
            return 1
        else:
            return 0
    elif int(s[0]) == 1:
        if int(s[1]) <=2:
            return 1
        else:
            return 0
    else:
        return 0

S = input()
tmp = list(S)
first = ''.join([tmp[0],tmp[1]])
second = ''.join([tmp[2],tmp[3]])

flag1 = -1
flag2 = -1


flag1 = judge(second)


flag2 = judge(first)


if flag1 ==1 and flag2 == 1:
    print("AMBIGUOUS")
elif flag1 == 1 and flag2 == 0:
    print("YYMM")
elif flag1 == 0 and flag2 == 1:
    print("MMYY")
else:
    print("NA")

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    s = list(input())
    a = int(s[0] + s[1])
    b = int(s[2] + s[3])

    if 1 <= a and a <= 12 and 1 <= b and b <= 12:
        return "AMBIGUOUS"
    
    if a >= 12 and 1 <= b and b <= 12:
        return "YYMM"
    
    if a <= 1 and a <= 12 and b >= 12:
        return "MMYY"

    return "NA"

print(main())


Failing test case input:
1297

Expected output:
MMYY


Actual output:
NA


Fixed submission (verdict: Accepted):
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())

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input()
if 1 <= int(S[:2]) <= 12 and 1 <= int(S[2:]) <= 12:
    print("AMBIGUOUS")
elif int(S[:2]) > 12 and int(S[2:]) != 0:
    print("YYMM")
elif int(S[2:]) > 12 and int(S[:2]) != 0:
    print("MMYY")
else:
    print("NA")

Failing test case input:
3459

Expected output:
NA


Actual output:
YYMM


Fixed submission (verdict: Accepted):
S = input()
if 1 <= int(S[:2]) <= 12 and 1 <= int(S[2:]) <= 12:
    print("AMBIGUOUS")
elif 1 <= int(S[2:]) <= 12:
    print("YYMM")
elif 1 <= int(S[:2]) <= 12:
    print("MMYY")
else:
    print("NA")
Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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")


Failing test case input:
2131

Expected output:
NA


Actual output:

Fixed submission (verdict: Accepted):
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')

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')

Failing test case input:
1211

Expected output:
AMBIGUOUS


Actual output:
Ambiguous


Fixed submission (verdict: Accepted):
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')

Problem: p03042
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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')

Failing test case input:
1055

Expected output:
MMYY


Actual output:
YYMM


Fixed submission (verdict: Accepted):
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')
Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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('AMBIGUOUS')
elif isYYMM:
    print('YYMM')
elif isMMYY:
    print('MMYY')
else:
    print('NA')


Failing test case input:
4353

Expected output:
NA


Actual output:
43 53
NA


Fixed submission (verdict: Accepted):
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')

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import bisect

lis = [1, 12]

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

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])

Failing test case input:
4704

Expected output:
YYMM


Actual output:
NA


Fixed submission (verdict: Accepted):
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])

Problem: p03042
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



S=input()

f=int(S[:2])
l=int(S[2:])

if(f==0 and l==0):
	print("NA")
	exit()
if(f==0 and l<=12):
	print("YYMM")
	exit()
if(f<=12 and l==0):
	print("MMYY")
	exit()

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






Failing test case input:
1700

Expected output:
NA

Actual output:
YYMM


Fixed submission (verdict: Accepted):

S=input()

f=int(S[:2])
l=int(S[2:])

if(f==0 and l==0):
	print("NA")
	exit()
if(f==0 and l<=12):
	print("YYMM")
	exit()
if(f<=12 and l==0):
	print("MMYY")
	exit()
if(f==0 and l>12):
	print("NA")
	exit()
if(f>12 and l==0):
	print("NA")
	exit()


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

Problem: p03042
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
S = input()
 
if int(S[:2]) > 13:
  if int(S[2:]) > 13 or int(S[2:]) == 0: print('NA')
  else: print('YYMM')
else:
  if int(S[2:]) > 13: print('MMYY')
  else: print('AMBIGUOUS')
  

Failing test case input:
1365

Expected output:
NA


Actual output:
MMYY


Fixed submission (verdict: Accepted):
S = input()
 
if int(S[:2]) > 12 or int(S[:2]) == 0:
  if int(S[2:]) > 12 or int(S[2:]) == 0: print('NA')
  else: print('YYMM')
else:
  if int(S[2:]) > 12 or int(S[2:]) == 0: print('MMYY')
  else: print('AMBIGUOUS')