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:
x = list(input())
first = 10 * x[0] + x[1]
second = 10 * x[2] + x[3]


def mc(num):
    if 1 <= num <= 12:
        return True
    else:
        return False


def yc(num):
    if 1 <= num <= 99:
        return True
    else:
        return False


if yc(first):
    if mc(second):
        if yc(second):
            if mc(first):
                print("AMBIGUOUS")
            else:
                print("YYMM")
        else:
            print("YYMM")
    elif yc(second):
        if mc(first):
            print("MMYY")
        else:
            print("NA")
    else:
        pirnt("NA")
elif yc(second):
    if mc(first):
        print("MMYY")
    else:
        print("NA")
else:
    print("NA")

Submission status: Runtime Error

Solution code:

n1,n2=int(n[:2]),int(n[2:])
if (n1>12 and n2>12) or (n1==0 and n2==0):
    print("NA")
elif (n1!=0 and n1<=12) and (n2!=0 and n2<=12):
    print("AMBIGUOUS")
elif n1!=0 and n1<=12:
    print("MMYY")
elif n2!=0 and n2<=12:
    print("YYMM")
else:
    print("errer")

Submission status: Runtime Error

Solution code:
0112
AMBIGUOUS

Submission status: Runtime Error

Solution code:
try:
    s1=(input(''))
    if len(s1)>=4:
        raise ValueError
    
    check=list((s1))
    assert bool(int(check[0]+check[1])<=12) != bool(int(check[2]+check[3])<=12)
    if int(check[0]+check[1])<=12:
        print("MMYY")
    elif int(check[2]+check[3])<=12:
        print("YYMM")
except AssertionError:
    if int(check[0]+check[1])<=12 and int(check[2]+check[3])<=12:
        print("AMBIGUOUS")
    else:
        print("NA")

Submission status: Runtime Error

Solution code:
try:
    s1=(input(''))
    if len(s1)==4:
        check=list((s1))
    if int(check[0]+check[1])<=12 != int(check[2]+check[3])<=12:
        if int(check[0]+check[1])<=12:
            print("MMYY")
        elif int(check[2]+check[3])<=12:
            print("YYMM")
    elif int(check[0]+check[1])<=12 == int(check[2]+check[3])<=12:
        if int(check[0]+check[1])<=12 and int(check[2]+check[3])<=12:
            print("AMBIGUOUS")
        else:
            print("NA")

Submission status: Runtime Error

Solution code:
S=int(input())
a=s//100
b=s%100
if a>0 and a<=12:
  if b>0 and b<=12:
    print("AMBIGUOUS")
  else:
    print("MMYY")
else:
  if b>0 and b<=12:
    print("YYMM")
  else:
    print("NA")

Submission status: Runtime Error

Solution code:
YYMM = False
MMYY = False
f = input()
h1 = f[0] + f[1]
h2 = f[2] + f[3]

if 1 <= h2 <= 12:
  YYMM = True
if 1 <= h1 <= 12:
  MMYY = True

def ret(c1,c2):
  if c1 and c2:
    return "AMBIGUOUS"
  elif c1:
    return "YYMM"
  elif c2:
    return "MMYY"
  else:
    return "NA"
  
print(ret(YYMM,MMYY))

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int main(){
  int S;
  cin>>S;
  int x1,x2,x3,x4;
  x1=S/1000;
  x2=(S-x1*1000)/100;
  x3=(S-x1*1000-x2*100)/10;
  x4=S-x1*1000-x2*100-x3*10;
  if ((10*x1+x2)==0 or (10*x1+x2)>=13){
      if ((10*x3+x4)==0 or (10*x3+x4)>=13){
        cout<<"NA"<<endl;
      } else {
        cout<<"YYMM"<<endl;
      }
  } else {
    if ((10*x3+x4)==0 or (10*x3+x4)>=13){
        cout<<"MMYY"<<endl;
      } else {
        cout<<"AMBIGUOUS"<<endl;
      }
  }
}

Submission status: Runtime Error

Solution code:
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')
elof a<0 and b<0:
  print('NA')

Submission status: Runtime Error

Solution code:
while True:
    c = input()
    c = [int(c[0] + c[1]),int(c[2] + c[3])]
    g = ""
    if c[0] > 12 and c[1] < 13 and c[1] != 0:
        g = "YYMM"
    if c[0] < 13 and c[1] > 12 and c[0] != 0:
        g = "MMYY"
    if c[0] < 13 and c[1] < 13:
        g = "AMBIGUOUS"
    if c[0] < 1 or c[1] < 1 or c[1] > 12 and c[0] > 12:
        g = "NA"
    print(g)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
print {(0,0):'NA', (0,1): 'YYMM', (1,0): 'MMYY', (1,1):'AMBIGUOUS'}[tuple(map(int,list(tuple([(0<int(s[2*i:2*i+2]) <= 12)	for i in range(2)]))))]

Submission status: Runtime Error

Solution code:
def f(s):return tuple([0<int(s[2*i:2*i+2]) <= 12	for i in range(0,2,2)])
		
print {(0,0):'NA', (0,1): 'YYMM', (1,0): 'MMYY', (1,1):'AMBIGUOUS'}[tuple(map(int,list(f(raw_input()))))]

Submission status: Runtime Error

Solution code:
def f(s):
  m,y = int(s[:2]), int(s[2:])
  return (0 < m <= 12,0 < y <= 12 )

p,q = map(int,list(f(raw_input()))
print {(0,0):'NA', (0,1): 'YYMM', (1,0): 'MMYY', (1,1):'AMBIGUOUS'}[(p,q)]

Submission status: Runtime Error

Solution code:
def f(s):
  m,y = int(s[:2]), int(s[2:])
  return 0< m <= 12:

def g(s):
  y,m = int(s[:2]), int(s[2:])
  return 0< m <= 12:
    
s = raw_input()
p,q = f(s), g(s)

if p and q:
  print 'AMBIGUOUS'
elif p and not(q):
  print 'MMYY'
elif q and not(p):
  print 'YYMM'
else:
  print 'NA'

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=input()
f=n[:2]
l=n[2:]
if (f=="00" and l=="00") or (int(f)>12 and int(l)>12):
    print("NA")
elif int(f)>12 or f=="00":
    print("YYMM")
elif int(l)>12 l=="00":
    print("MMYY")
else:
    print("AMBIGUOUS")

Submission status: Runtime Error

Solution code:
n=input():
f=n[:2]
l=n[2:]
if (f=="00" and l=="00") or (int(f)>12 and int(l)>12):
    print("NA")
elif int(f)>12 or f=="00":
    print("YYMM")
elif int(l)>12 l=="00":
    print("MMYY")
else:
    print("AMBIGUOUS")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

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()
else
    if sa >= 1 and sa <= 12:
        print('MMYY')
        exit()
    if sb >= 1 and sb <= 12:
        print('YYMM')
        exit()

print('NA')

Submission status: Runtime Error

Solution code:

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 sb <= 12:
    print('YYMM')
    exit()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

if 1 <= int(s[0:2]) and int(s[0:2]) <= 12:
    if 1 <= int(s[2:4]) and int(s[2:4]) <= 12:
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if 1 <= int(s[2:4]) and int(s[2:4]) <= 12:
        print('YYMM')
    else:
        print('NA')

Submission status: Runtime Error

Solution 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])
    print("NA")
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")

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
s = list(input())

for i in range(4):
    s[i] = int(s[i])

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


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

Submission status: Runtime Error

Solution code:
X = input()
A = int(X[0:2])
B = int(X[2:])

if A == 0:
  if B == 0:
    print('NA')
  elif B > 12:
    print('NA')
  else:
    print('YYMM')
elif A > 12:
  if B == 0:
    print('NA')
  else B > 12:
    print('NA')
  else:
    print('YYMM')
else:
  print('MMYY')

Submission status: Runtime Error

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

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:
  print("MMYY")
elif 1<=B<=12:
  print("YYMM")
else:
  print("NA")

Submission status: Runtime Error

Solution code:
# ABC126B

s = input()
aa = s // 100
bb = s %  100
if 1 <= aa and aa <= 12:
    if 1 <= bb and bb <= 12:
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if 1 <= bb and bb <= 12:
        print('YYMM')
    else:
        print('NA')

Submission status: Runtime Error

Solution code:
a,b,c,d=input()
x=int(a+b)
y=int(c+d)
if 0<=x<=12 and 1<=y<=12:
  print('AMBIGUOUS')
elif 1<=x<=12 and 0<=y=12:
  print('AMBIGUOUS')
elif 0<=x<=99 and 1<=y<=12:
  print('YYMM')
elif 1<=x<=12 and 0<=y<=99:
  print('MMYY')
else:
  print('NA')

Submission status: Runtime Error

Solution code:
a,b,c,d=map(int,input().split())
x=int(a+b)
y=int(c+d)
if 0<=x<=12 and 0<=b<=12:
  if x==y==0:
    print('NA')
  else:
    print('AMBIGUOUS')
elif 0<=x<=99 and 1<=y<=12:
  print('YYMM')
elif 1<=x<=12 and 0<=y<=99:
  print('MMYY')
else:
  print('NA')

Submission status: Runtime Error

Solution code:
s = list(map(int,input().split()))
if s[0] <= 1 and s[1] <= 2:
    if s[2] <= 1 and s[3] <= 2:
        print('AMBIGUOUS')
    else:
        print('MMYY')
elif s[2] <= 1 and s[3] <= 2:
    print('YYMM')
else:
    print('NA')

Submission status: Runtime Error

Solution code:
S = input()
s01 = int(S[0]+S[1])
s23 = int(S[2]+S[3])
if (0 < s01 and s01 <= 12) and (0 < s23 and s23 <= 12):
    print('AMBIGUOUS')

elif (0 < s01 and s01 <= 12) and (s23 > 12 or s23 == 0):
    print('MMYY')

elif (s01 > 12 or s12 == 0) and (0 < s23 and s23 <= 12):
    print('YYMM')
else:
    print('NA')

Submission status: Runtime Error

Solution code:
#include <iostream>
#define ll long long
using namespace std;

int main() {
    ll a, b, c, d;
    cin >> a ;
    if(a%100 <= 12 && a%100 > 0 && a / 100 <= 12 && a / 100 > 0) cout << "AMBIGUOUS" << endl;
    else if(a%100 <= 12 && a%100 > 0) cout << "YYMM" << endl;
    else if(a/100 <= 12 && a / 100 > 0) cout << "MMYY" << endl;
    else cout << "NA" << endl;
    return 0;
}

Submission status: Runtime Error

Solution code:
if 1 <= s_1 <=12 and 1 <= s_2 <= 12:
    print("AMBIGUOUS")
elif 1 <= s_1 <= 12:
    print("MMYY")
elif 1 <= s_2 <= 12:
    print("YYMM")
else:
    print("NA")

Submission status: Runtime Error

Solution code:
S=str(input())

Ans=[int(S[0]+S[1]),int(S[2]+S[3])]


if Ans[0]>12:
    if Ans[1]>12:
        print("NA")
    elif Ans[1]==0:
        print("NA")
    else:
        print("YYMM")
elif Ans[0]==0:
    print("NA")
else:
    if A[1]>12:
        print("MMYY")
    elif A[1]==0:
        print("NA")
    else:
        print("AMBIGUOUS")

Submission status: Runtime Error

Solution code:
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 int(S[:2]) != 0:
    print("MMYY")
else:
    print("NA")

Submission status: Runtime Error

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

if 1 <= s1 <= 12 and 1 <= s2 <= 12:
  print('AMBIGUOUS')
elif 1 <= s1 <= 12 and (s2 == 0 or s2 >= 13):
  print('MMYY')
elif (s1 == 0 or s1 >= 13) and 1 <= s2 <= 12:
  print('YMMM')
elif (s1 == 0 or s1 >= 13) and (s2 == 0 or s2 >= 13)
  print('NA')

Submission status: Runtime Error

Solution code:
s = input()
head = s[:1]
teil = s[2:]
if head>12:
  if teil>12:
    print("NA")
  else:
    print("YYMM")
else:
  if teil>12:
    print("MMYY")
  else:
    print("AMBIGUOUS")

Submission status: Runtime Error

Solution code:
s = input()

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

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

Submission status: Runtime Error

Solution code:

s = str(input())

mm_f = 0
mm_e = 0

if 0 < int(s[0:2]) <= 12:
    mm_f = 1
if 0 < int(s[2:]) <= 12:
    mm_e = 1

if mm_f == 1 and mm_e == 1:
    print('AMBIGUOUS')
elif mm_f == 1 and mm == 0:
    print('MMYY')
elif mm_f == 0 and mm_e == 1:
    print('YYMM')
else:
    print('NA')

Submission status: Runtime Error

Solution code:
s=input()
be=s[:2]
af=s[2:]

if s=="0000":
  print("NA")

elif int(be)<=12 and int(af)<=12 and be!="00" and af!=="00":
  print("AMBIGUOUS")

elif int(af)<=12:
  if af=="00":
    print("NA")
  else:
    print("YYMM")
    
elif int(be)<=12:
  if be=="00":
    print("NA")
  else:
    print("MMYY")
  
else:
  print("NA")

Submission status: Runtime Error

Solution code:
s=input()
be=s[:2]
af=s[2:]

if s=="0000":
  print("NA")
  
if be=="00" or af=="00":
  if int(af)<=12:
    if af=="00":
      print("NA")
    else:
      print("YYMM")
      
  elif int(be)<=12:
  if be=="00":
    print("NA")
  else:
    print("MMYY")

elif int(be)<=12 and int(af)<=12:   
    print("AMBIGUOUS")
  
else:
  print("NA")

Submission status: Runtime Error

Solution code:
s = input()
front = int(s[:2])
back = int(s[2:])
if 0 in (front, back):
    ans = 'NA'
elif 0 < front < 13 and 0 < back < 13:
    ans = 'AMBIGUOUS'
elif 0 < front < 13:
    ans = 'MMYY'
elif 0 < back < 13:
    ans = 'YYMM'
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 a>12) and 0<b<=12:
    print("YYMM")
elif 0<a<=12 and 0<b<=12:
    print("AMBIGUOUS")
elif 0<a<=12 and b>12:
    print("MMYY")
else:
    print("NA")

Submission status: Runtime Error

Solution code:
s=list(input())
u=[int(s[0]+s[1]),int(s[2]+s[3])]
if(u[0]<=12):
    m1=1
    if(u[1]<=12):
        m2=1
    else:
        m2=0
else:
    m1=0
    if(u[1]<=12):                                                                                                                           m2=1                                                                                                                            else:
        m2=0
if(m1==1 and m2==0):
    print('MMYY')                                                                                                                   elif(m1==1 and m2==1):
    print('AMBIGUOUS')
elif(m1==0 and m2==0):
    print('NA')
else:
    print('YYMM')

Submission status: Runtime Error

Solution code:
	def main():
	    str = input()
	    YY = []
	    MM = []
	    YYMM_flg = False
	    MMYY_flg = False
	    AMB_flg = False
	    NA_flg = False

	    for i in range(2):
	    	YY.append(str[i])

	    for i in range(2, 4):
	    	MM.append(str[i])

	    yy = int(''.join(YY))
	    mm = int(''.join(MM))

	    if (yy >= 1 and yy <= 12) and (mm >= 1 and mm <= 12):
	    	AMB_flg = True
	    elif (mm >= 1 and mm <= 12) and (yy != 0 or mm != 0):
	    	YYMM_flg = True
	    elif (yy >= 1 and yy <= 12) and (yy != 0 or mm != 0):
	    	MMYY_flg = True
	    else:
	    	NA_flg = True

	    if AMB_flg:
	    	print("AMBIGUOUS")
	    elif YYMM_flg:
	    	print("YYMM")
	    elif MMYY_flg:
	    	print("MMYY")
	    elif NA_flg:
	    	print("NA")


	if __name__ == "__main__":
	    main()

Submission status: Runtime Error

Solution code:
A = str(input())
AC = list(A)
AB = A[0] + A[1]
AC = A[2] + A[3]

if 1 <= AB <= 12:
    if 1 <= AC <= 99:
        print("AMBIGUOUS")
    else:
        print("MMYY")
elif 1 <= AC <= 12:
     if 1 <= AB <= 99:
        print("AMBIGUOUS")
    else:
        print("YYMM")
elif AB == 0 or AB >= 13:
    if AC == 0 or AC >= 13:
        print("NA")

Submission status: Runtime Error

Solution code:
s = list(map(int,list(input()))
a = s[0]*10+s[1]
b = s[2]*10+s[3]
lst = [1,2,3,4,5,6,7,8,9,10,11,12]
if a in lst:
    if b in lst:
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if b in lst:
        print('YYMM')
    else:
        print('NA')

Submission status: Runtime Error

Solution code:
x=input()
a=x[:2]
b=x[2:]
ans_lst=[]
for y in [a,b]:
	if "00"<y<"13":
  		ans_lst.append(True)
    else:ans_lst.append(False)
if all(ans_lst):
    print("AMBIGUOUS")
elif not any(ans_lst):
    print("NA")
elif ans_lst[0] and ans_lst[1]==False:
	print("MMYY")
elif ans_lst[0]==False and ans_lst[1]:
	print("YYMM")

Submission status: Runtime Error

Solution code:
s = int(input())
l = s / 100
r = s % 100

if(1 <= l && l <= 12):
    if(1 <= r && r <= 12):
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if(1 <= r && r <= 12):
        print('YYMM')
    else:
        print('NA')

Submission status: Runtime Error

Solution code:
s = int(input())
l = s / 100
r = s % 100

if(1 <= l && <= 12):
    if(1 <= r && r <= 12):
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if(1 <= r && r <= 12):
        print('YYMM')
    else:
        print('NA')

Submission status: Runtime Error

Solution code:
s = int(input())
l = s / 100
r = s % 100

if(1 <= l && <= 12):
    if(1 <= r && r <= 12):
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if(1 <= r && r <= 12):
        print('YYMM')
    else:
      print('NA')

Submission status: Runtime Error

Solution code:
#include<time.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
using ll = long long;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;
using namespace std;
struct Fast { Fast(){ std::cin.tie(0); ios::sync_with_stdio(false); } } fast;

template<typename ...Ts>
void show(Ts... ts){
  cout<<"#:";
  auto print=[](auto v){cout<<v<<" ";};
  initializer_list<int>{(void(print(ts)),0)...};
  cout<<endl;
}

int main(void){
    int n,y,m;
    string ans;
    cin>>n;
    y=n/100;
    m=n%100;
    //cout<<y<<' '<<m<<endl;
    if (1<=m and m<=12){
        if (1<=y && y<=12){
            ans="AMBIGUOUS";
        }else{
            ans="YYMM";
        }
    }else if(1<=y && y<=12){
        ans="MMYY";
    }else{
        ans="NA";
    }
    cout<<ans;
}

Submission status: Runtime Error

Solution code:
s = input()
yymm = False
mmyy = False
first = int(s[:2])
last = int(s[2:])
if first<=12 and first >0:
  mmyy = True
if last <=12 and last>0:
  yymm = True
if mmyy == True and yymm = True:
  print('AMBIGUOUS')
elif mmyy == True and yymm = False:
  print('MMYY')
elif mmyy == False and yymm = True:
  print('YYMM')
else:
  print('NA')

Submission status: Runtime Error

Solution code:
s = input()

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
 s = input()
l = s[:2]
r = s[2:]
yy = [str(i).zfill(2) for i in range(100)]
mm = [str(i).zfill(2) for i in range(1, 13)]

if l in mm and r in mm:
    print("AMBIGUOUS")
elif l in yy and r in mm:
    print("YYMM")
elif l in mm and r in yy:
    print("MMYY")
else:
    print("NA")

Submission status: Runtime Error

Solution code:
S = input()
ot = S[:2]
tf = S[2:]

isotMM = 0
istfMM = 0

if 0 < int(ot) and int(ot) < 13:
    isotMM = 1
if 0 < int(tf) and int(tf) < 13:
    istfMM = 1
    
if isotMM == 1:
    if istfMM == 1:
        print('AMBIGUOUS')
    else:
        print('MMYY')
else:
    if istfMM == 1:
        print('YYMM')
    else:
        print(NA)

Submission status: Runtime Error

Solution code:
s=input()
f=int(s[:2])
b=int(s[3:])
if f>13:
	if 0<b and b<13:
		print("YYMM")
	else:
		print("NA")
else:
	if 0<b and b<13:
		print("AMBIGUOUS")
	else:
		prinr("MMYY")

Submission status: Runtime Error

Solution code:
S = input()
Fa = int(S[:2])
Se = int(S[2:])
if 1 <= Fa,Se <= 12:
	print("AMBIGIOUS")
elif 1 <= Fa <= 12:
	print("MMYY")
elif 1 <= Se <= 12:
	print("YYMM")
else:
	print("NA")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def month(num):
    if 0 < num <= 12:
        return True
    else:
        return False


S = input()
first = int(S[:2])
second = int(S[2:])

if month(first)
    if month(second):
        print('AMBIGUOUS')
    else:
        print('MMYY')

elif not month(first) and month(second):
    print('YYMM')

else:
    print('NA')

Submission status: Runtime Error

Solution code:
S = input()

if (1 <= S[:2] <= 12) & (1 <= S[2:] <= 12):
    print('AMBIGUOUS')
elif (1 <= S[:2] <= 12) & ((S[2:] == 0) or (13 <= S[2:])):
    print('MMYY')
elif (1 <= S[2:] <= 12) & ((S[:2] == 0) or (13 <= S[:2])):
    print('YYMM')
else:
    print('NA')

Submission status: Runtime Error

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

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

print(ans)

Submission status: Runtime Error

Solution code:
ef YorM(x):                                                                                                                                                        
        #1...YorM                                                                                                                                                   
        #0...Y                                                                                                                                                      
    if((1<=x)and(x<=12)):                                                                                                                                           
        return 1                                                                                                                                                    
    else:                                                                                                                                                           
        return 0                                                                                                                                                    
                                                                                                                                                                    
def D(a,b):                                                                                                                                                         
    n1 = YorM(a)                                                                                                                                                    
    n2 = YorM(b)                                                                                                                                                    
    #print(n1, n2)                                                                                                                                                  
    if(n1==0 and n2==0):                                                                                                                                            
        print("NA")                                                                                                                                                 
    elif(n1==0 and n2==1):                                                                                                                                          
        print("YYMM")                                                                                                                                               
    elif(n1==1 and n2==0):                                                                                                                                          
        print("MMYY")                                                                                                                                               
    else:                                                                                                                                                           
        print("AMBIGUOUS")

Submission status: Runtime Error

Solution code:
date = input()
firstvalid = isMonth(date[0:2])
secondvalid = isMonth(date[2:])

if firstvalid && secondvalid:
  print('AMBIGUOUS')
elif firstvalid:
  print('MMYY')
elif secondvalid:
  print('YYMM')
else:
  print('NA')
  


def isMonth(x):
  return 1 <= int(x) <= 12

Submission status: Runtime Error

Solution code:

s = input()
mm1 = False
mm2 = False

if 0 < int(s[:2]) < 13:
    mm1 = True
if 0 < int(s[-2:]) < 13:
    mm2 = True

if mm1 == True and mm2 == True:
    print("AMBIGUOUS")
    return 
if mm1 == False and mm2 == False:
    print("NA")
    return
if mm1 == True and mm2 == False:
    print("MMYY")
    return
if mm1 == False and mm2 == True:
    print("YYMM")
    return
print("NA")

Submission status: Runtime Error

Solution code:
s = input()

l = 0<int(s[:2])<13
r = 0<int(s[2:])<13

if l = 1:
  print('AMBIGUOUS' if r = 1 else 'MMYY')
else:
  print('YYMM' if r = 1 else 'NA')

Submission status: Runtime Error

Solution code:
S = input()
f,e = int(S[:2]),int(S[2:])
if f==0 of e==0 or (f>12 and e>12):
  print('NA')
  exit()
if 1<=f<=12:
  if e>12:
    print('MMYY')
  elif 1<=e<=12
    print('AMBIGUOUS')
elif f>12:
  if 1<=e<=12:
    print('YYMM')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input()
aa = int(s[:2])
bb = int(s[2:])

if 0<aa and aa<=12:
  if 0<bb and bb<=12:
    print('AMBIGUOUS')
  elif bb==0:
    print('NA')
  else:
    print('MMYY')
elif aa!=0:
  0<bb and bb<=12:
  print('YYMM')
else:
  print('NA')

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 int(S[0:2]) > 12 and 0 < (int(S[2:4])) <= 12:
    print("YYMM")
elif 0 < int(S[0:2]) <= 12 and int(S[2:4]) > 12:
    print("MMYY")
elif int(S[0:2]) == and 0 < (int(S[2:4])) <= 12:
    print("YYMM")
elif 0 < int(S[0:2]) <= 12  and 0 < (int(S[2:4])) == 0:
    print("MMYY")
else:
    print("NA")

Submission status: Runtime Error

Solution code:
S = input()

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

ans = "NA"
if 1 <= head <= 12:
    if 1 <= tail <= 12:
        ans = "AMBIGUOUS"
    else:
        "YYMM"
elif 1 <= tail <= 12:
    ans = "MMYY"
    
print(ans)