1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <bits/stdc++.h>

using namespace std;

int n, a, ile, wynik=0;

int main()
{
    ios::sync_with_stdio(false);
    cin >> n;
    for (int i=1; i<=n; i++)
    {
        cin >> a;
        if (a==1)
            ile++;
    }
    ile = min(2, ile);
    wynik = 2-ile;
    cout << wynik << endl;
    cout << 2 << endl;
    cout << 1 << " " << 2 << endl;
}