#include <bits/stdc++.h>
using pii=std::pair<int,int>;
using namespace std;
const int maxn = 42;
int n, xs, ys, x[maxn], y[maxn];
vector<pair<pii, pii>> solve(int from, int till)
{
assert(till >= from);
int sz = (till - from + 1);
vector<pair<pii, int>> cnt;
for(int mask = 0; mask < (1ll << sz); mask++)
{
int steps = __builtin_popcount(mask);
int curx = 0, cury = 0;
for(int j = 0; j < sz; j++)
if(mask & (1ll << j))
{
curx += x[from + j];
cury += y[from + j];
}
cnt.push_back({{curx, cury}, steps});
}
sort(cnt.begin(), cnt.end());
vector<pair<pii, pii>> uniq_cnt;
for(int i = 0; i < cnt.size(); i++)
{
int j = i;
while(j + 1 < cnt.size() && cnt[j + 1] == cnt[i])
j++;
uniq_cnt.push_back({cnt[i].first, {cnt[i].second, j - i + 1}});
i = j;
}
return uniq_cnt;
}
int32_t main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cin >> n >> xs >> ys;
for(int i = 1; i <= n; i++)
cin >> x[i] >> y[i];
if(n == 1)
{
cout << (x[1] == xs && y[1] == ys) << "\n";
return 0;
}
int mid = n / 2;
auto cnt1 = solve(1, mid);
auto cnt2 = solve(mid + 1, n);
vector<long long> ans(n + 1, 0);
reverse(cnt2.begin(), cnt2.end());
for(int i = 0; i < cnt1.size(); i++)
{
int from1 = i, till1 = i;
while(till1 + 1 < cnt1.size() && cnt1[till1 + 1].first == cnt1[from1].first)
till1++;
int from2 = lower_bound(cnt2.begin(), cnt2.end(), make_pair(make_pair(xs - cnt1[i].first.first, ys - cnt1[i].first.second), make_pair(n, 1000000000)), greater<>()) - cnt2.begin();
int till2 = from2 - 1;
while(till2 + 1 < cnt2.size() && cnt1[from1].first.first + cnt2[till2 + 1].first.first == xs && cnt1[from1].first.second + cnt2[till2 + 1].first.second == ys)
till2++;
for(int j = from1; j <= till1; j++)
for(int k = from2; k <= till2; k++)
ans[cnt1[j].second.first + cnt2[k].second.first] += cnt1[j].second.second * 1ll * cnt2[k].second.second;
i = till1;
}
for(int i = 1; i <= n; i++)
cout << ans[i] << "\n";
return 0;
}