1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//
//  main.cpp
//  Poddrzewo
//
//  Created by Cezary Chodun on 12/11/18.
//

//#include <iostream>
#include <bits/stdc++.h>

using namespace std;
#define ll long long
#define int2 pair<int, int>
#define mp make_pair
#define X first
#define Y second

int n;
int ileJeden = 0;

int main(){
    
    cin >> n;
    
    for(int i = 0; i < n; i++){
        int x;
        cin >> x;
        
        if(x == 1)
            ileJeden++;
    }
    
    cout << (max(0, 2-ileJeden)) << "\n";
    cout << "2\n";
    cout << "1 2\n";
    
    return 0;
}