#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#define pb push_back
#define mp make_pair
#define ll long long
using namespace std;
const int N = 5e3 + 5;
const int MAX_SUM = 205;

int n, m;
int sm[N * N];

int ans;
vector <int> ans_seq;

int have[MAX_SUM];
bool check(int x)
{
    vector <int> seq;
    seq.pb(x);

    memset(have, 0, sizeof(have));
    for(int i = 1; i <= m; i++)
        have[sm[i]]++;
    for(int id = 0; id < seq.size(); id++)
    {
        for(int i = seq[id] + 1; i < MAX_SUM; i++)
        {
            if(have[i])
            {
                int last = (int)seq.size();
                seq.pb(i - seq[id]);
                for(int j = last - 1; j >= 0; j--)
                {
                    if(have[i - seq[id] + seq[j]] == 0)
                        return false;
                    have[i - seq[id] + seq[j]]--;
                }
            }
        }
    }

    for(int i = 0; i < MAX_SUM; i++)
        if(have[i])
            return false;

    ans_seq = seq;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL); cout.tie(NULL);

    cin >> n;
    m = n * (n - 1) / 2;
    for(int i = 1; i <= m; i++)
        cin >> sm[i];

    sort(sm + 1, sm + m + 1);
    for(int i = sm[1] / 2; i >= 1; i--)
    {
        if(check(i))
            ans++;
    }

    cout << ans << endl;
    for(auto x: ans_seq)
        cout << x << " ";
    cout << endl;

    return 0;
}

/*

3
3 4 5

*/
