Score : $400$ points
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.
Input is given from Standard Input in the following format:
$N$ $A_1$ $A_2$ $\dots$ $A_N$
If there is no pair of sequences $B, C$ satisfying the conditions, print a single line containing No
.
Otherwise, print your choice of $B$ and $C$ in the following format:
Yes $x$ $B_1$ $B_2$ $\dots$ $B_x$ $y$ $C_1$ $C_2$ $\dots$ $C_y$
The checker is case-insensitive: you can use either uppercase or lowercase letters.
5 180 186 189 191 218
Yes 1 1 2 3 4
For $B=(1),C=(3,4)$, we have $A_1 = 180,\ A_3 + A_4 = 380$, which are equal modulo $200$.
There are other solutions that will also be accepted, such as:
yEs 4 2 3 4 5 3 1 2 5
2 123 523
Yes 1 1 1 2
6 2013 1012 2765 2021 508 6971
No
If there is no pair of sequences satisfying the conditions, print a single line containing No
.