{"trustable":true,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n section pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n {left: \u0027\\\\[\u0027, right: \u0027\\\\]\u0027, display: true}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"Problem Statement","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cp\u003eYou have a digit sequence \u003cvar\u003e\\(S\\)\u003c/var\u003e of length \u003cvar\u003e\\(4\\)\u003c/var\u003e. You are wondering which of the following formats \u003cvar\u003e\\(S\\)\u003c/var\u003e is in:\u003c/p\u003e\r\n\u003cul\u003e\r\n\u003cli\u003eYYMM format: the last two digits of the year and the two-digit representation of the month (example: \u003ccode\u003e01\u003c/code\u003e for January), concatenated in this order\u003c/li\u003e\r\n\u003cli\u003eMMYY format: the two-digit representation of the month and the last two digits of the year, concatenated in this order\u003c/li\u003e\r\n\u003c/ul\u003e\r\n\u003cp\u003eIf \u003cvar\u003e\\(S\\)\u003c/var\u003e is valid in only YYMM format, print \u003ccode\u003eYYMM\u003c/code\u003e; if \u003cvar\u003e\\(S\\)\u003c/var\u003e is valid in only MMYY format, print \u003ccode\u003eMMYY\u003c/code\u003e; if \u003cvar\u003e\\(S\\)\u003c/var\u003e is valid in both formats, print \u003ccode\u003eAMBIGUOUS\u003c/code\u003e; if \u003cvar\u003e\\(S\\)\u003c/var\u003e is valid in neither format, print \u003ccode\u003eNA\u003c/code\u003e.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Constraints","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cul\u003e\r\n\u003cli\u003e\u003cvar\u003e\\(S\\)\u003c/var\u003e is a digit sequence of length \u003cvar\u003e\\(4\\)\u003c/var\u003e.\u003c/li\u003e\r\n\u003c/ul\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Input","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cp\u003eInput is given from Standard Input in the following format:\u003c/p\u003e\r\n\u003cpre\u003e\u003cvar\u003e\\(S\\)\u003c/var\u003e\r\n\u003c/pre\u003e\r\n\r\n\u003c/section\u003e\r\n"}},{"title":"Output","value":{"format":"HTML","content":"\r\n\u003csection\u003e\r\n\u003cp\u003ePrint the specified string: \u003ccode\u003eYYMM\u003c/code\u003e, \u003ccode\u003eMMYY\u003c/code\u003e, \u003ccode\u003eAMBIGUOUS\u003c/code\u003e or \u003ccode\u003eNA\u003c/code\u003e.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Sample 1","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e1905\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYYMM\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003cp\u003eMay \u003cvar\u003e\\(XX19\\)\u003c/var\u003e is a valid date, but \u003cvar\u003e\\(19\\)\u003c/var\u003e is not valid as a month. Thus, this string is only valid in YYMM format.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Sample 2","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e0112\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eAMBIGUOUS\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003cp\u003eBoth December \u003cvar\u003e\\(XX01\\)\u003c/var\u003e and January \u003cvar\u003e\\(XX12\\)\u003c/var\u003e are valid dates. Thus, this string is valid in both formats.\u003c/p\u003e\r\n\u003c/section\u003e\r\n"}},{"title":"Sample 3","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e1700\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eNA\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003c/section\u003e\r\n\r\n\u003csection\u003e\r\n\r\n\r\n\u003cp\u003eNeither \u003cvar\u003e\\(0\\)\u003c/var\u003e nor \u003cvar\u003e\\(17\\)\u003c/var\u003e is valid as a month. Thus, this string is valid in neither format.\u003c/p\u003e\u003c/section\u003e\r\n"}}]}