rt
# pragma GCC optimize("Ofast,no-stack-protector")
# pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
# include <bits/stdc++.h>
# define I return
# define AK 0
# define IOI ;
using namespace std;
typedef long long ll;
typedef pair <int, int> pii;
const int mod = 998244353;
struct node {
int step, end, x;
bool operator < (const node& a) const {
return step != a.step ? step < a.step : end != a.end ? end < a.end : x < a.x;
}
} ;
int n, a[85], sum;
map <node, int> dp;
int main () {
ios::sync_with_stdio (0);
cin.tie (0);
cout.tie (0);
cin >> n;
if (n == 1) {
cout << '1';
return 0;
}
cout << n << ' ' << n*(n - 1) / 2 << ' ';
for (int i = 0; i < n; ++ i) {
cin >> a[i];
for (int j = 0; j < i; ++ j)
dp[ {2, i, a[i] - a[j]}] = 1;
}
for (int k = 3; k <= n; ++ k) {
sum = 0;
for (int i = 0; i < n; ++ i)
for (int j = i + 1; j < n; ++ j)
dp[ {k, j, a[j] - a[i]}] += dp[ {k - 1, i, a[j] - a[i]}], dp[ {k, j, a[j] - a[i]}] %= mod, sum += dp[ {k - 1, i, a[j] - a[i]}], sum %= mod;
cout << sum << ' ';
}
// cout << '\n';
// for (auto i = dp.begin (); i != dp.end (); ++ i) cout << (i->first.step) << ',' << (i->first.end) << ',' << (i->first.x) << ':' << (i->second) << '\n';
I AK IOI
}