#include <iostream>
#include <vector>
#include <fstream>
#include <ctime>
#include <random>
#include <algorithm>
#include <cassert>
#include <queue>
#include <cstring>
#include <unordered_map>
using namespace std;

random_device rand_dev;
mt19937_64 generator(rand_dev());
main() {
    srand(time(0));
    for(int i = 31; i <= 40; i++) {
        int n = 1+generator()%(100000-1);
        vector<long long> p;
        for(int i = 1; i <= n; i++) p.push_back((generator()%(long long)1e18)*(generator()%2==0?1:-1));
        ofstream in(string("ezici.") + (i<10?"0":"") + (i<100?"0":"") + to_string(i) + ".in");
        ofstream out(string("ezici.") + (i<10?"0":"") + (i<100?"0":"") + to_string(i) + ".out");
        in << -4 << endl;
        in << n << endl;
        long long odd=0,even=0;
        for(auto x : p) {in << x << " "; odd+=1-(x%2==0); even+=x%2==0;}
        in << endl;
        out << even*(even-1)/2+odd*(odd-1)/2 << endl;
    }
}