#D. ABC200D - Happy Birthday! 2

    Type: Default 1000ms 256MiB

ABC200D - Happy Birthday! 2

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Score : 400 points

Problem Statement

You are given a sequence of N positive integers: A=(A1,A2,,AN). Determine whether there is a pair of sequences B=(B1,B2,,Bx),C=(C1,C2,,Cy) satisfying all of the conditions, and print one such pair if it exists.

  • 1x,yN.
  • 1B1<B2<<BxN.
  • 1C1<C2<<CyN.
  • B and C are different sequences.
    • Here, we consider B and C different when x=y or there is an integer i (1imin(x,y)) such that Bi=Ci.
  • AB1+AB2++ABx and AC1+AC2++ACy are equal modulo 200.

Constraints

  • All values in input are integers.
  • 2N200
  • 1Ai109

Input

Input is given from Standard Input in the following format:

N
A1 A2  AN

Output

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 B1 B2  Bx
y C1 C2  Cy

The checker is case-insensitive: you can use either uppercase or lowercase letters.


Sample Input 1

5
180 186 189 191 218

Sample Output 1

Yes
1 1
2 3 4

For B=(1),C=(3,4), we have A1=180, A3+A4=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

Sample Input 2

2
123 523

Sample Output 2

Yes
1 1
1 2

Sample Input 3

6
2013 1012 2765 2021 508 6971

Sample Output 3

No

If there is no pair of sequences satisfying the conditions, print a single line containing No.

ABC200

Not Attended
Status
Done
Rule
IOI
Problem
6
Start at
2023-6-26 9:00
End at
2023-6-26 11:00
Duration
2 hour(s)
Host
Partic.
9