{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cbr\u003eA\u003cimg src\u003d\"CDN_BASE_URL/7de22a2acf1c5367933d5db70aa1496a?v\u003d1715982531\" style\u003d\"vertical-align: text-bottom;top: -2.0px;max-width: 100.0%;max-height: 100.0%;\"\u003eof order \u003ci\u003en\u003c/i\u003e is a linear order \u003cimg src\u003d\"CDN_BASE_URL/f7390e3cf48c5e4fcee1a63bd252b67a?v\u003d1715982531\" style\u003d\"vertical-align: text-bottom;top: -2.0px;max-width: 100.0%;max-height: 100.0%;\"\u003e of 2n objects \u003cimg src\u003d\"CDN_BASE_URL/77c3e8244e54000d423992d87df4615a?v\u003d1715982531\" style\u003d\"vertical-align: text-bottom;top: -2.0px;max-width: 100.0%;max-height: 100.0%;\"\u003e satisfying the following conditions:\u003cbr\u003e \u003cli\u003eFor each \u003ci\u003ei\u003c/i\u003e such that 1≤ \u003ci\u003ei\u003c/i\u003e≤ \u003ci\u003en\u003c/i\u003e holds \u003cimg src\u003d\"CDN_BASE_URL/9a6912a99e7007c52d9cfdef794399c0?v\u003d1715982531\" style\u003d\"vertical-align: text-bottom;top: -2.0px;max-width: 100.0%;max-height: 100.0%;\"\u003e \u003c/li\u003e\u003cli\u003eFor each \u003ci\u003ei\u003c/i\u003e and \u003ci\u003ej\u003c/i\u003e such that 1≤ \u003ci\u003ei\u003c/i\u003e,\u003ci\u003ej\u003c/i\u003e≤ \u003ci\u003en\u003c/i\u003e holds \u003cimg src\u003d\"CDN_BASE_URL/bb9890066240e32b961ab6ba2f18c69e?v\u003d1715982531\" style\u003d\"vertical-align: text-bottom;top: -2.0px;max-width: 100.0%;max-height: 100.0%;\"\u003e. \u003cbr\u003eLet \u003cimg src\u003d\"CDN_BASE_URL/008527b9a48f4f47ea64987b3e0a97e4?v\u003d1715982531\" style\u003d\"vertical-align: text-bottom;top: -2.0px;max-width: 100.0%;max-height: 100.0%;\"\u003e\u003cbr\u003e(\u003ci\u003eb\u003c/i\u003e\u003csub\u003e\u003ci\u003eii\u003c/i\u003e\u003c/sub\u003e is undefined). Let \u003ci\u003ea\u003c/i\u003e(\u003ci\u003ei\u003c/i\u003e) be the number of such \u003ci\u003ej\u003c/i\u003e that \u003cimg src\u003d\"CDN_BASE_URL/436d5f6f0fd910e0bbbd4701792ec8c7?v\u003d1715982531\" style\u003d\"vertical-align: text-bottom;top: -2.0px;max-width: 100.0%;max-height: 100.0%;\"\u003e. You are given integers \u003ci\u003ea\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e,\u003ci\u003ea\u003c/i\u003e\u003csub\u003e2\u003c/sub\u003e,..., \u003ci\u003ea\u003c/i\u003e\u003csub\u003e\u003ci\u003en\u003c/i\u003e\u003c/sub\u003e. You have to find any bipermutation such that \u003ci\u003ea\u003c/i\u003e(\u003ci\u003ei\u003c/i\u003e)\u003da\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e for all \u003ci\u003ei\u003c/i\u003e.\u003cbr\u003e\u003cdiv align\u003d\"left\" style\u003d\"margin-top: 1.0em;\"\u003e\u003cb\u003eInput\u003c/b\u003e\u003c/div\u003eThe first line of the input contains single integer \u003ci\u003en\u003c/i\u003e (1≤ \u003ci\u003en\u003c/i\u003e≤ 1000). The next line contains the numbers \u003ci\u003ea\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e,...,\u003ci\u003ea\u003c/i\u003e\u003csub\u003e\u003ci\u003en\u003c/i\u003e\u003c/sub\u003e.\u003cbr\u003e\u003cdiv align\u003d\"left\" style\u003d\"margin-top: 1.0em;\"\u003e\u003cb\u003eOutput\u003c/b\u003e\u003c/div\u003eIf there is no solution, the only line of the output must contain single word \u0027NO\u0027 (without quotes). Otherwise the first line of the output must contain single word \u0027YES\u0027 (without quotes); the rest of the output must contain the objects ordered with respect to the bipermutation (\u003cimg src\u003d\"CDN_BASE_URL/8f88e5af0c25e082f4300188f02f0c28?v\u003d1715982531\" style\u003d\"vertical-align: text-bottom;top: -2.0px;max-width: 100.0%;max-height: 100.0%;\"\u003e is output as -\u003ci\u003ei\u003c/i\u003e).\u003cbr\u003e"}},{"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\u003e9\n2 0 3 0 4 8 1 5 4\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eYES\n-6 -8 -9 6 -5 -3 8 9 -7 5 -1 -4 3 7 -2 1 4 2 \n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"","value":{"format":"HTML","content":"\u003cbr\u003e\nHint: If \u003cimg src\u003d\"CDN_BASE_URL/436d5f6f0fd910e0bbbd4701792ec8c7?v\u003d1715982531\" style\u003d\"vertical-align: text-bottom;top: -2.0px;max-width: 100.0%;max-height: 100.0%;\"\u003e and \u003cimg src\u003d\"CDN_BASE_URL/7a4dcf0f639689110c435525cad714c7?v\u003d1715982531\" style\u003d\"vertical-align: text-bottom;top: -2.0px;max-width: 100.0%;max-height: 100.0%;\"\u003e, then \u003cimg src\u003d\"CDN_BASE_URL/9f3987281a1c6ab5c23a0864527cd3f3?v\u003d1715982531\" style\u003d\"vertical-align: text-bottom;top: -2.0px;max-width: 100.0%;max-height: 100.0%;\"\u003e.\n\u003cbr\u003e\n Novosibirsk SU Contest #2, by Novosibirsk Team #1"}}]}