{"problem":{"name":"Happy Birthday! 2","description":{"content":"You are given a sequence of $N$ positive integers: $A = (A_1, A_2, \\dots, A_N)$. Determine whether there is a pair of sequences $B = (B_1, B_2, \\dots, B_x), C = (C_1, C_2, \\dots, C_y)$ satisfying all ","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc200_d"},"statements":[{"statement_type":"Markdown","content":"You are given a sequence of $N$ positive integers: $A = (A_1, A_2, \\dots, A_N)$. Determine whether there is a pair of sequences $B = (B_1, B_2, \\dots, B_x), C = (C_1, C_2, \\dots, C_y)$ satisfying all of the conditions, and print one such pair if it exists.\n\n*   $1 ≤ x, y ≤ N$.\n*   $1 \\le B_1 < B_2 < \\dots < B_{x} \\le N$.\n*   $1 \\le C_1 < C_2 < \\dots < C_{y} \\le N$.\n*   $B$ and $C$ are different sequences.\n    *   Here, we consider $B$ and $C$ different when $x ≠ y$ or there is an integer $i\\ (1 ≤ i ≤ \\min(x, y))$ such that $B_i ≠ C_i$.\n*   $A_{B_1} + A_{B_2} + \\dots + A_{B_x}$ and $A_{C_1} + A_{C_2} + \\dots + A_{C_y}$ are equal modulo $200$.\n\n## Constraints\n\n*   All values in input are integers.\n*   $2 \\le N \\le 200$\n*   $1 \\le A_i \\le 10^9$\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n$A_1$ $A_2$ $\\dots$ $A_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc200_d","tags":[],"sample_group":[["5\n180 186 189 191 218","Yes\n1 1\n2 3 4\n\nFor $B=(1),C=(3,4)$, we have $A_1 = 180,\\ A_3 + A_4 = 380$, which are equal modulo $200$.  \nThere are other solutions that will also be accepted, such as:\n\nyEs\n4 2 3 4 5\n3 1 2 5"],["2\n123 523","Yes\n1 1\n1 2"],["6\n2013 1012 2765 2021 508 6971","No\n\nIf there is no pair of sequences satisfying the conditions, print a single line containing `No`."]],"created_at":"2026-03-03 11:01:14"}}