Problem:


Score : 200 points

Problem Statement

You have a digit sequence S of length 4. You are wondering which of the following formats S is in:

YYMM format: the last two digits of the year and the two-digit representation of the month (example: 01 for January), concatenated in this order

MMYY format: the two-digit representation of the month and the last two digits of the year, concatenated in this order

If S is valid in only YYMM format, print YYMM; if S is valid in only MMYY format, print MMYY; if S is valid in both formats, print AMBIGUOUS; if S is valid in neither format, print NA.

Constraints

S is a digit sequence of length 4.

Input

Input is given from Standard Input in the following format:

S

Output

Print the specified string: YYMM, MMYY, AMBIGUOUS or NA.

Sample Input 1

1905

Sample Output 1

YYMM

May XX19 is a valid date, but 19 is not valid as a month. Thus, this string is only valid in YYMM format.

Sample Input 2

0112

Sample Output 2

AMBIGUOUS

Both December XX01 and January XX12 are valid dates. Thus, this string is valid in both formats.

Sample Input 3

1700

Sample Output 3

NA

Neither 0 nor 17 is valid as a month. Thus, this string is valid in neither format.



Sample input:
1905


Sample output:
YYMM

Submission status: Runtime Error

Solution code:
s = input()

a = s[:2]
b = s[2:]

ans = 0

if a <= 12 and a >= 1:
    ans += 2

if b <= 12 and b >= 1:
  ans += 3
  
if ans == 0:
  print("NA")
elif ans == 2:
  print("MMYY")
elif ans == 3:
  print("MMYY")
elif ans == 5:
  print("AMBIGUOUS")

Submission status: Runtime Error

Solution code:
s = input()

a = s[0:1]
b = s[2:3]

ans = 0

if a <= 12 and a >= 1:
    ans += 2

if b <= 12 and b >= 1:
  ans += 3
  
if ans == 0:
  print("NA")
elif ans == 2:
  print("MMYY")
elif ans == 3:
  print("MMYY")
elif ans == 5:
  print("AMBIGUOUS")

Submission status: Runtime Error

Solution code:
s=list(input())
a=s[0],s[1]
b=s[2],s[3]
a="".join(a);a=int(a)
b="".join(b);b=int(b)
if a==00 or b==00:
  if a == 00:
    if 1 <= b and b <= 12:
      print("YYMM")
    else:
      print("NA")
  else: # b == 00
    if 1 <= a and a <= 12:
      print("MMYY")
    else:
	  print("NA")
elif a>12 and b>12:
    print("NA")
elif not a>12 and not b>12:
    print("AMBIGUOUS")
elif a>12 and b!=00:
    print("YYMM")
elif b>12 and a!=00:
    print("MMYY")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=input()
sf=int(s[:2])
sl=int(s[2:4])
if sf>=13 or sl<=12 and sl>0:
  print('YYMM')
elif 12>=sf>0 and sl==0:
  print('MMYY')
elif sf>12 and sl=0 or sf=0 and sl>12:
  print('AMBIGUOUS')
else:
  print('NA')

Submission status: Runtime Error

Solution code:
a,b,c,d = str(input())

if 1<=int(a+b)<=12 and 1<=int(c+d)<=12:
  print("AMBIGUOUS")
elif 1<=int(a+b)<=12 
  print("MMYY")
elif 1<=int(c+d)<=12 
  print("YYMM")
else:
  print("NA")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,c,d = input()

li1 = [a,b]
li2 = [c,d]

int1 = int(''.join(li1))
int2 = int(''.join(li2))

if (int1 > 12 and int2 > 12):
    ans = 'NA'
elif (int1 == 0 and int2 == 0):
    ans = 'NA'
elif (int1 > 12 and int2 == 0):
    ans = 'NA'
elif (int1 > 12):
    ans = 'YYMM'
elif (int2 > 12 and int1 == 0):
    ans = 'NA'
elif (int2 > 12):
    ans = 'MMYY'
elif:
    ans = 'AMBIGUOUS'

print(ans)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
s=input()
print(s[:k-1]+s[k-1].lower()+s[k:])

Submission status: Runtime Error

Solution code:
s=list(input())

# s1 = (int)(s[0] + s[1])
s1=int(s[0])*10+int(s[1])
s2=int(s[2])*10+int(s[3])

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

Submission status: Runtime Error

Solution code:
s=list(int(input()))

s1=s[0]*10+s[1]
s2=s[3]*10+s[4]

if s1<=12 and s2<=12:
    ans='AMBIGUOUS'
elif s1<=12 and s2>12:
    ans ='MMYY'
elif s1>12 and s2<=12:
    ans ='YYMM'
else:
    ans='NA'

Submission status: Runtime Error

Solution code:
a=input()
s=[(int(a[0])*10)+int(a[1]),(int(a[2])*10)+int(a[3])]

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

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
import sys


def solve(S: int):

    S = str(S)

    if int(S[:2]) > 12 and 1 <= int(S[2:]) <= 12:
        print("YYMM")
    elif 1 <= int(S[:2]) <= 12 and int(S[2:]) > 12:
        print("MMYY")
    elif 1 <= int(S[:2]) <= 12 and 1 <= int(S[2:]) <= 12:
        print("AMBIGUOUS")
    else:
        print("NA")

    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    S = int(next(tokens))  # type: int
    solve(S)


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
s=input()
s1=int(s[:2])
s2=int(s[2:])
if 0<s1<13 and 0<s2<13:
  print("AMBIGUOUS")
if (12<s1 or s1=0) and 0<s2<13:
  print("YYMM")
if (12<s2 or s2=0) and 0<s1<13:
  print("MMYY")
else:
  print("NA")

Submission status: Runtime Error

Solution code:
S = int(input())
if S[:2] > 12:
    if 13 > S[2:] > 0
        print("YYMM")
    else:
        print("NA")
elif 0 < S[:2] < 13:#12xx~01xx
    if S[2:] > 12:
        print("MMYY")
    elif 0 < S[2:] < 13:
        print("AMBIGUOUS")
    else:
        print("YYMM")
else:#00xx
    if 0 < S[2:] <13:
        print("YYMM")
    else:
        print("NA")

Submission status: Runtime Error

Solution code:
def main(f, e):
    if f==0 or e==0:
        print("NA")
        return 0
    if f <13:
        elif e < 13:
            print("AMBIGUOUS")
        else:
            print("MMYY")
    else:
        if e < 13:
            print("YYMM")
        else:
            print("NA")

if __name__ == "__main__":
    S = input()

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

Submission status: Runtime Error

Solution code:
S = input()

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

if f==0 or e==0:
    print("NA")
    return 0

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

Submission status: Runtime Error

Solution code:
S=input()
s1=int(S[0:2])
s2=int(S[3:5])

if 1<=s1<=12 and (s2>12 or S2==0):
    print("MMYY")
elif (s1>12 or s1==0) and 1<=s2<=12:
    print("YYMM")
elif 1<=s1<=12 and 1<=s2<=12:
    print("AMBIGUOUS")
else:
    print("NA")

Submission status: Runtime Error

Solution code:
S = str(int(input()))
UE = (S)[:2]
ST = (S)[2:]
if UE[0] == '0':
  UE = UE[1]
  UE = int(UE)
else:
  UE = int(UE)
if ST[0] == '0':
  ST = ST[1] 
  ST = int(ST)
else:
  ST = int(ST)
if UE > 12:
  if ST <= 12 and ST != 00:
    print('YYMM')
  else:
    print('NA')
elif UE <= 12 and UE != 00:
  if ST <= 12 and ST != 00:
    print('AMBIGUOUS')
  elif ST > 12 and ST != 00 :
    print('MMYY')
  else:
    print('NA')
else:
  print('NA')

Submission status: Runtime Error

Solution code:
YM=0
MY=0
F=int(X[0] + X[1])
B=int(X[2] + X[3])
if 0<F<=12 :
    MY += 1
else:
    pass

if 0<B<=12 :
    YM += 1
else:
    pass

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

Submission status: Runtime Error

Solution code:
S = input()
if S[:2] == "00":
  if S[2:] > 12:
  	print("NA")
  else:
    print("YYMM")
elif S[2:] == "00":
  if S[:2] > 12:
  	print("NA")
  else:
    print("MMYY")
elif int(S[:2]) > 12 and int(S[2:]) > 12:
  print("NA")
elif int(S[:2]) < 13 and int(S[2:]) < 13:
  print("AMBIGUOUS")
elif int(S[:2]) < 13:
  print("MMYY")
else:
  print("YYMM")

Submission status: Runtime Error

Solution code:
S = input()
if S[:2] == "00":
  if S[2:] > 12:
  	print("NA")
  else:
    print("YYMM")
elif S[2:] == "00":
  if S[:2] > 12:
  	print("NA")
  else:
    print("MMYY")
elif int(S[:2]) > 12 and S[2:] > 12:
  print("NA")
elif int(S[:2]) < 13 and S[2:] < 13:
  print("AMBIGUOUS")
elif int(S[:2]) < 13:
  print("MMYY")
else:
  print("YYMM")

Submission status: Runtime Error

Solution code:
s = input()
a = 0

sf = s[:1]  #'sf' is the formar part of the S
sl = s[2:]  #'sl' is the latter part of the S

for i in range(1:9):
  if sf[0] == 0:
    if sf[1] == i:
      a += 1
    else:
  else:
for j in range(0:2):
  if sf[0] == 1:
      if sf[1] == j:
        a += 1
      else:
  else:

for i in range(1:9):
  if sl[0] == 0:
    if sl[1] == i:
      a += 1
    else:
  else:
for j in range(0:2):
  if sl[0] == 1:
      if sl[1] == j:
        a += 1
      else:
  else:
    
if a == 0:
  print('NA')
elif a == 2:
  print('AMBIGUOUS')
elif a == 2:
  print('YYMM')

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
import sys


def solve(S: int):
    a, b = str(S)[:2], str(S)[2:]
    if a == '00' or b == '00':
        print('NA')
        return
    fa, fb = False, False
    if int(a) > 12:
        fa = True
    if int(b) > 12:
        fb = True
    if fa and fb:
        print('NA')
        return
    if fa and not fb:
        print('YYMM')
        return
    if not fa and fb:
        print('MMYY')
        return
    if not fa and not fb:
        print('AMBIGUOUS')
        return
    return


# Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools
# (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = int(next(tokens))  # type: int
    solve(S)


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
X = input()

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

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

Submission status: Runtime Error

Solution code:
S = int(input())
 
if 1 <= S[2:4] <= 12 and 1 <= S[0:2] <= 12:
    print('AMBIGUOUS') 
elif 1 <= S[2:4] <= 12:
    print('YYMM')
elif 1 <= S[0:2] <= 12:
    print('MMYY')
else:
    print('NA')

Submission status: Runtime Error

Solution code:
S = map(int, input())
 
if 1 <= S[2:4] <= 12 and 1 <= S[0:2] <= 12:
    print('AMBIGUOUS') 
elif 1 <= S[2:4] <= 12:
    print('YYMM')
elif 1 <= S[0:2] <= 12:
    print('MMYY')
else:
    print('NA')

Submission status: Runtime Error

Solution code:
S = input()
 
if S[2:3] > 12 and S[:2] == '00':
  print('NA')
else:
  if S[2:3] > 12:
    print('YYMM')
  elif S[:1] == '00':
    print('MMYY')
  else:
    print('AMBIGUOUS')

Submission status: Runtime Error

Solution code:
S = input()

if S[2:3] > 12 and S[:1] == '00':
  print('NA')
else:
  if S[2:3] > 12:
    print('YYMM')
  elif S[:1] == '00':
    print('MMYY')
  else:
    print('AMBIGUOUS')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b, c, d = list(input())
if 0 < 10*a + b <= 12 and 0 < c*10 + d <= 12:
    print('AMBIGUOUS')
elif 10*a + b >= 12 and 0 < c*10 + d <= 12:
    print('YYMM')
elif 0 < 10*a + b <= 12 and c*10 + d >= 12:
    print('MMYY')
else:
    print('NA')

Submission status: Runtime Error

Solution code:
s=list(map(int,input()))
a=10*s[0]+s[1]
b=10*s[2]+s[3]
if a<=12 and b<=12:
    print('AMBIGUOUS')
elif a+b==0:
    print('NA')
elif a>12 and b>12:
    print('NA')
elif a==0,b>12:
    print('NA')
elif b==0.a>12:
    print('NA')
elif 0<a<=12 and 12<b:
    print('MMYY')
elif 0<b<=12 and 12<a:
    print('YYMM')
elif 0<a<=12 and 0==b:
    print('MMYY')
elif 0<b<=12 and 1==a:
    print('YYMM')

Submission status: Runtime Error

Solution code:
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 lst1[1] >=13):
  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")

Submission status: Runtime Error

Solution code:
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 lst1[1] >=13):
  print("NA")
  
elif (0<int(lst1[0])<=12 and 0<int(lst1[1])<=12):
      print("AMBIGUOUS")
      
elif 0<lst1[0] <=12 and int(lst1[1])>=13:
      print("MMYY")
elif 0<lst1[1]<=12 and int(lst1[0])>=13:
      print("YYMM")

Submission status: Runtime Error

Solution code:
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 lst1[1] >=13):
  print("NA")
  
elif (0<int(lst1[0])<=12 and 0<int(lst1[1])<=12):
      print("AMBIGUOUS")
      
elif 0<lst1[0] <=12:
      print("MMYY")
elif 0<lst1[1]<=12:
      print("YYMM")

Submission status: Runtime Error

Solution code:
S = int(input())
A = S // 100
B = S % 100
MMA = False
MMB = False
if 1 <= A and A <= 12:
  MMA = True
if 1 <= B and B <= 12:
  MMB = True

if MMA and MMB:
  print(AMBIGUOUS)
elif MMA and not(MMB):
  print('MMYY')
elif not(MMA) and MMB:
  print('YYMM')
else:
  print('NA')

Submission status: Runtime Error

Solution code:
s = int(input())
a, b = s//100, s%100
boos = int(input())
a, b = s//100, s%100
p = bool(1 <= a <= 12)
q = bool(1 <= b <= 12)
if p & q:
    print("AMBIGUOUS")
elif p:
    print("MMYY")
elif q:
    print("YYMM")
else:
    print("NA")

Submission status: Runtime Error

Solution code:
s = str(input())
w = list(map(int, input().split()))
f = "".join(w[0:2])
b = "".join(w[2:4])
if 1 <= int(f) <= 12 and  1 <= int(b) <= 12:
    print("AMBIGUOUS")
elif 1 <= int(b) <= 12 and not  1 <= int(f) <= 12:
    print("YYMM")
elif 1 <= int(f) <= 12 and not  1 <= int(b) <= 12:
    print("MMYY")
else:
    print("NA")

Submission status: Runtime Error

Solution code:
if (n1 == 0 or n2 == 0) or (n1 > 12 and n2 > 12):
    print('NA')
elif n1 <= 12:
    print('MMYY')
elif n2 <= 12:
    print('YYMM')
else:
    print('AMBIGUOUS')

Submission status: Runtime Error

Solution code:
l=[i for i in str(input())]
A=int(''.join(l[:2]))
B=int(''.join(l[2:]))

if A==00 or A>=13:
  if B==00 or B>=13:
    print('NA')
  else:
    print('YYMM')
elif A>=01 and A<=12:
  if B==00 or B>=13:
    print('MMYY')
  else:
    print('AMBIGUOUS')

Submission status: Runtime Error

Solution code:
s = list(input())
f = int(''.join(s[:2]))
r = int(''.join(s[2:]))
yymm = 0
mmyy = 0
if 0 <= f and f <= 99:
    if 1<=r and r<= 12:
        yymm = 1
if 1<=f and f<= 12:
    if 0 <= r and r <= 99:
        mmyy = 1
if mmyy == 1 and yymm == 1:
    print('AMBIGUOUS')
elif mmyy == 0 and yymm == 1:
    print('YYMM')
elif myy == 1 and yymm == 0:
    print('MMYY')
else:
    print('NA')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = str(input())

YM = ((int(s[:2]) <= 12),(int(s[:2]) <= 12))

print('AMBIGUOUS') if YM == (True,True) else pass
print('MMYY') if YM == (True,False) else pass
print('YYMM') if YM == (False,True) else pass
print('NA') if YM == (False,False) else pass

Submission status: Runtime Error

Solution code:
s = str(input())

YM = ((int(s[:2]) <= 12),(int(s[:2]) <= 12))

print('AMBIGUOUS') if YM == (True,True)
print('MMYY') if YM == (True,False)
print('YYMM') if YM == (False,True)
print('NA') if YM == (False,False)

Submission status: Runtime Error

Solution code:
s = str(input())
if ((s[:2]=="00") | (s[2:]=="00") | (s[:2]>"12") & (s[2:]>"12")):
	ans = "NA"
elif (s[:2]>"12") & (s[2:]<="12")):
	ans = "YYMM"
elif (s[:2]>"12") & (s[2:]<="12")):
	ans = "MMYY"
else:
	ans = "AMBIGUOUS"

print(ans)

Submission status: Runtime Error

Solution code:
s = input()
a = int(s[0] + s[1])
b = int(s[2] + s[3])

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

Submission status: Runtime Error

Solution code:
N = list(input())
m = list(map(int,N))
a = 10*m[0] + m[1]
b = 10*m[2] + m[3]
 
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")
N = list(input())
m = list(map(int,N))
a = 10*m[0] + m[1]
b = 10*m[2] + m[3]
 
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")

Submission status: Runtime Error

Solution code:
s = input()
a = int(s[0:2])
b = int(s[2:4])
if (a == 0 & b == 0)|(a>12 & b>12):
   print("NA")
else if(a <= 12 & b <= 12):
  print("AMBIGUOUS")
else if(a <= 12 & b > 12):
  print("MMYY")
else:
  print("YYMM");

Submission status: Runtime Error

Solution code:
s=int(input())
x=s//100
y=s-x*100

if x*y=0:
  print("NA")

else:
  if x<13:
    if y<13:
      print("AMBIGUOUS")
    else:
      print("MMYY")
     
  else:
    if y<13:
      print("YYMM")
    else:
      print("NA")

Submission status: Runtime Error

Solution code:
n = input()

a = int(n[0]+n[1])
b = int(n[2]+n[3])
if b = 0 or b > 12:
	if 1 <= a <= 12:
		print("MMYY")
	else:
		print("NA")
elif 1 <= a <= 12:
	print("AMBIGUOUS")
else:
	print("YYMM")

Submission status: Runtime Error

Solution code:
S = int(input())

first_half = round(S, -2) / 100
second_half = S - round(S, -2)

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

Submission status: Runtime Error

Solution code:
S = int(input())

first_half = round(S, -2) / 100
second_half = S - round(S, -2)

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

Submission status: Runtime Error

Solution code:
a = input()
b = int(a[:2])
c = int(a[2:])
if 0 < b <= 12 and a < c <= 12:
    print("AMBIGUOUS")
elif 0 < b <= 12 and c > 12:
    print("MMYY")
elif b > 12 and 0 < c <= 12:
    print("YYMM")
else:
    print("NA")

Submission status: Runtime Error

Solution code:
S=str(input())

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

Submission status: Runtime Error

Solution code:
S=str(input())

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

Submission status: Runtime Error

Solution code:
s = input()

front = s[:2]
back =s[2:]

if (front == "00" or back == "00") or (front > 13 and back >13):
    print("NA")
elif 1 <= int(back) <= 12:
    if 1 <= int() <= 12:
        print("AMBIGUOUS")
    else:
        print("YYMM")
else:
    print("MMYY")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S_mojiretsu = input() 

mae2moji = S_mojiretsu[:2]
usiro2moji = S_mojiretsu[2:]

flg = 0
if mae2moji == '00':
    None
elif usiro2moji == '00':
    None
else:
    if usiro2moji in mm_list:
        flg += 1
    if mae2moji in mm_list:
        flg += 2

if flg == 0:
    print('NA')
elif flg == 1:
    print('YYMM')
elif flg == 2:
    print('MMYY')
else:
    print('AMBIGUOUS')

Submission status: Runtime Error

Solution code:
S_mojiretsu = input() 

mae2moji = S_mojiretsu[:2]
usiro2moji = S_mojiretsu[2:]

flg = 0
if mae2moji == '00':
    pass
elif usiro2moji == '00':
    pass
else:
    if usiro2moji in mm_list:
        flg += 1
    if mae2moji in mm_list:
        flg += 2

if flg == 0:
    print('NA')
elif flg == 1:
    print('YYMM')
elif flg == 2:
    print('MMYY')
else:
    print('AMBIGUOUS')

Submission status: Runtime Error

Solution code:
data = int(input())
up = data/100
down = data % 100
if(1 <= up and up <= 12):
    if(1 <= down and down <= 12):
        print("AMBIGUOUS")
    else:
        print("MMYY")
else:
    if(1 <= down and down <= 12):
        print("YYMM")
    else:
        print(NA)

Submission status: Runtime Error

Solution code:
s = input()

head = int(s[:2])
tail = int(s[2:])

if 0 < head <= 12 and 0 < tail <= 12:
  print("AMBIGUOUS")

elif 0 < head <= 12:
  print("MMYY")
elif 0 < tail <= 12:
  print("YYMM")
elif :
  print("NA")

Submission status: Runtime Error

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

head = s[:1]
tail = s[1:]

if head > 12:
  print("YYMM")
if tail > 12:
  print("MMYY")
if 0 < head <= 12 and 0 < tail <=12:
  print("AMBIGUOUS")
if head = 0 or tail = 0:
  print("NA")
if head > 12 and tail > 12:
  print("NA")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def solve():
	unknownDate = input()
	datePre = int(unknownDate[:2])
	datePos = int(unknownDate[2:])
	
	isPreMightMonth = (0 < datePre <= 12)
	isPostMightMonth = (0 < datePos <= 12)
	
	if isPreMightMonth and isPostMightMonth:
		print('AMBIGUOUS')
	elif isPreMightMonth and (not isPostMightMonth):
		print('MMYY')
	elif (not isPreMightMonth) and isPostMightMonth:
		print('YYMM')
	else:
		print('NA')
 solve()

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
s = input()
a = int(s[:2]) > 13 or int(s[:2])=0
b = int(s[2:]) > 13 or int(s[2:])=0
if a and b:
  print("NA")
elif not a and not b:
  print("AMBIGUOUS")
elif not a and b:
  print("MMYY")
else:
  print("YYMM")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=int(input())
l=[]
while s>0:
  l.append(s%100)
  s//=100
print("AMBIGUOUS" if 1<=l[0]<=12 and 1<=l[1]<=12 else "YYMM" if 1<=l[0]<=12 else "MMYY" if 1<=l[1]<=12 else "NA")

Submission status: Runtime Error

Solution code:
a = input()
over = int(a[:2])
under = int(a[2:])
if 0<over<13 and 0<under<13:
   print("AMBIGUOUS")
elif 0<over<13 and (1>under or under>12):
   print("YYMM")
elif(0<under<13 and (1>over or over>12):
   print("MMYY")
else:
     print("NA")

Submission status: Runtime Error

Solution code:
a = input()
over = int(a[:2])
under = int(a[2:])
if 0<over<13 and 0<under<13:
   print("AMBIGUOUS")
elif 0<over<13 and (1>under or under>12):
   print("YYMM")
elif(0<under<13 and (1>over or over>12):
   print("MMYY")
else:
   print("NA")

Submission status: Runtime Error

Solution code:
a = str(input())
over = int(a[:2])
under = int(a[2:])
if 0<over<13 and 0<under<13:
   print("AMBIGUOUS")
elif 0<over<13 and (1>under or under>12):
   print("YYMM")
elif(0<under<13 and (1>over or over>12):
   print("MMYY")
else:
   print("NA")

Submission status: Runtime Error

Solution code:
a = int(input())
b = str(a)
over = int(b[:2])
under = int(b[2:])
if 0<over<13 and 0<under<13:
   print("AMBIGUOUS")
elif 0<over<13 and (1>under or under>12):
   print("YYMM")
elif(0<under<13 and (1>over or over>12):
   print("MMYY")
else:
   print("NA")

Submission status: Runtime Error

Solution code:
a = int(input())
b = str(a)
over = int(b[:2])
under = int(b[2:])
if 0<over<13 and 0<under<13:
   print("AMBIGUOUS")
else if 0<over<13 and (1>under or under>12):
   print("YYMM")
else if(0<under<13 and (1>over or over>12):
   print("MMYY")
else:
   print("NA")

Submission status: Runtime Error

Solution code:
s = input()
if int(s[:2]) <=12 and >0:
  if int(s[2:]) <=12 or >0:
  	print('ABMIGUOUS')
  else:
    print('MMYY')
elif int(s[2:]) <=12 and >0:
  if int(s[:2]) >=12 or =0:
  	print('YYMM')
else:
    print('NA')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
if head <= 0 or tail <= 0:
    print('NA')
elif head > 12 and tail > 12:
    print('NA')
elif head > 12 and tail <= 12:
    print('YYMM')
elif head <= 12 and tail > 12:
    print('MMYY')
elif head <= 12 and tail <= 12:
    print('AMBIGUOUS')

Submission status: Runtime Error

Solution code:
a=(input())
b=int(a[0:2])
c=int(a[2:4])
if b==0 or c==o:
  print("NA")
elif b => 12 and c=>12:
  print("NA")
elif b =>12:
  print("YYMM")
elif c=>12:
  print("MMYY")
else:
  print("AMBIGUOUS")

Submission status: Runtime Error

Solution code:

S = input()

MAE = int(S[:2])
USIRO = int(S[2:])

MMYY_Flag = False
YYMM_Flag = False


if 1 <= MAE and 12 >= MAE:
    MMYY_Flag = True

if 1 <= USIRO and 12 >= USIRO:
    YYMM_Flag = True


if MMYY_Flag and YYMM_Flag:
    print ("AMBIGUOUS")

elif MMYY_Flag:
    print ("MMYY")
1700

elif YYMM_Flag:
    print ("YYMM")

else:
    print ("NA")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()
mae = int(S[:2])
ato = int(S[2:])
if mae == 0 or ato == 0:
    ans = 'NA'
elif mae <= 12 and ato <= 12:
    ans = 'AMBIGUOUS'
elif mae <= 12 and ato >= 13:
    ans = 'MMYY'
elif mae >= 13 and ato <= 12:
    ans = 'YYMM'
print(ans)

Submission status: Runtime Error

Solution code:

dic = {1,3,5,7,8,10,12}

s = input()


di = int(s[:2])
m1 = int(s[2:])

fl = 0

if m1>0 and m1<=12:
  if m1 in dic:
    if d1>=1 and d1<=31:
      fl = 1
  else:
    if m1 == 2:
      if d1>=1 and d1<=29:
        fl = 1
    else:
      if d1>=1 and d1<=30:
        fl = 1
d1,m1 = m1,d1

fl2 = 0

if m1>0 and m1<=12:
  if m1 in dic:
    if d1>=1 and d1<=31:
      fl2 = 1
  else:
    if m1 == 2:
      if d1>=1 and d1<=29:
        fl2 = 1
    else:
      if d1>=1 and d1<=30:
        fl2 = 1
if fl==0 and fl2==0:
  print("NA")
else:
  if fl==0:
    print("MMYY")
  elif fl2==0:
    print("YYMM")
  else:
    print("AMBIGUOUS")