#include <bits/stdc++.h>
#define endl '\n'

#define SZ(x) ((int)x.size())
#define ALL(V) V.begin(), V.end()
#define L_B lower_bound
#define U_B upper_bound
#define pb push_back

using namespace std;
template<class T, class T1> int chkmin(T &x, const T1 &y) { return x > y ? x = y, 1 : 0; }
template<class T, class T1> int chkmax(T &x, const T1 &y) { return x < y ? x = y, 1 : 0; }
const int MAXN = 542;

int n, L;
int a[MAXN * MAXN];

void read()
{
    cin >> n;
    for(int i = 0; i < n * (n - 1) / 2; i++)
        cin >> a[i];
    L = n * (n - 1) / 2;
}

unordered_map<int, int> used;

int ans[MAXN];

bool check(int x)
{
    used.clear();
    for(int i = 0; i < L; i++)
        used[a[i]]++;

    ans[0] = x;
    
    int pos = 0;
    for(int i = 1; i < n; i++)
    {
        while(pos < L && used[a[pos]] == 0) pos++;
        
        if(pos == L) return false;
        ans[i] = a[pos] - x;
    
        for(int j = 0; j < i; j++)
            if(!used[ans[i] + ans[j]])
                return false;
            else
                used[ans[i] + ans[j]]--;
    }

    return true;
}

void solve()
{
    int cnt = 0, frst = (int) 1e9;
    vector<int> cands;

    for(int i = 1; i < L; i++)
    {
        int ll, x;
        if(i == 1) ll = a[i + 1];
        else ll = a[1];

        x = a[0] + a[i] - ll;
        if(x > 0 && x % 2 == 0)
            cands.pb(x / 2);
    }

    sort(ALL(cands));
    cands.erase(unique(ALL(cands)), cands.end());

    for(int x: cands)
        if(check(x))
        {
            chkmin(frst, x);
            cnt++;            
        }

    check(frst);
    cout << cnt << endl;
    for(int i = 0; i < n; i++)
        cout << ans[i] << " ";
    cout << endl;
}

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

    read();
    solve();
    return 0;
}
