#include<iostream>
#include<iomanip>
#include<algorithm>
#include<stack>
#include<queue>
#include<string>
#include<string.h>
#include<cmath>
#include<vector>
#include<map>
#include<unordered_map>
#include<set>
#include<unordered_set>
#include<cstdio>
#include<bitset>
#include<chrono>
#include<random>
#include<ext/rope>
/* ordered_set
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
*/
#define int long long
#define pb push_back
#define fi first
#define se second
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int maxN = 40 + 5;
const int mod = 1e9 + 7;
const ll oo = 1e18;
int n;
int xg, yg;
ll res[maxN];
vector<pair<int, int>> vc1[maxN], vc2[maxN];
int n1, n2;
struct TPoint
{
int x, y;
} a[maxN], a1[maxN], a2[maxN];
inline void FastInput()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
}
void ReadInput()
{
cin >> n >> xg >> yg;
for(int i=1; i<=n; i++) cin >> a[i].x >> a[i].y;
}
int pos[maxN];
void Attempt1(int t)
{
if(t == n1 + 1)
{
ll x = 0, y = 0;
int cnt = 0;
for(int i=1; i<=n1; i++)
{
if(pos[i])
{
cnt++;
x += a1[i].x;
y += a1[i].y;
}
}
vc1[cnt].pb({x, y});
return;
}
for(pos[t]=0; pos[t]<=1; pos[t]++) Attempt1(t + 1);
}
void Attempt2(int t)
{
if(t == n2 + 1)
{
int cnt = 0;
ll x = 0, y = 0;
for(int i=1; i<=n2; i++)
{
if(pos[i])
{
cnt++;
x += a2[i].x;
y += a2[i].y;
}
}
vc2[cnt].pb({x, y});
return;
}
for(pos[t]=0; pos[t]<=1; pos[t]++) Attempt2(t + 1);
}
void Solve()
{
n1 = n / 2;
n2 = n - n1;
for(int i=1; i<=n1; i++) a1[i] = a[i];
for(int i=1; i<=n2; i++) a2[i] = a[i + n1];
Attempt1(1);
Attempt2(1);
for(int i=1; i<=n1; i++)
sort(vc1[i].begin(), vc1[i].end());
for(int i=1; i<=n2; i++)
sort(vc2[i].begin(), vc2[i].end(), greater<pair<int, int>>());
//for(pair<int, int> v : vc2[4]) cout << v.fi << " " << v.se << '\n';return;
for(int i=0; i<=n1; i++)
{
for(int k=0; k<=n2; k++)
{
int p = 0;
int mul1 = 1;
for(int j=0; j<vc1[i].size(); j++)
{
while(j + 1 < vc1[i].size() && vc1[i][j].fi == vc1[i][j + 1].fi && vc1[i][j].se == vc1[i][j + 1].se)
{
mul1++;
j++;
}
int x = xg - vc1[i][j].fi, y = yg - vc1[i][j].se;
while(p < vc2[k].size() && vc2[k][p].fi > x) p++;
while(p < vc2[k].size() && vc2[k][p].se > y && vc2[k][p].fi == x) p++;
int mul = 0;
while(p < vc2[k].size() && vc2[k][p].fi == x && vc2[k][p].se == y)
{
mul++;
p++;
}
res[i + k] += mul * mul1;
mul1 = 1;
}
}
}
for(int i=1; i<=n; i++) cout << res[i] << '\n';
}
int32_t main()
{
//freopen("x.inp", "r", stdin);
FastInput();
ReadInput();
Solve();
}
I2luY2x1ZGU8aW9zdHJlYW0+CiNpbmNsdWRlPGlvbWFuaXA+CiNpbmNsdWRlPGFsZ29yaXRobT4KI2luY2x1ZGU8c3RhY2s+CiNpbmNsdWRlPHF1ZXVlPgojaW5jbHVkZTxzdHJpbmc+CiNpbmNsdWRlPHN0cmluZy5oPgojaW5jbHVkZTxjbWF0aD4KI2luY2x1ZGU8dmVjdG9yPgojaW5jbHVkZTxtYXA+CiNpbmNsdWRlPHVub3JkZXJlZF9tYXA+CiNpbmNsdWRlPHNldD4KI2luY2x1ZGU8dW5vcmRlcmVkX3NldD4KI2luY2x1ZGU8Y3N0ZGlvPgojaW5jbHVkZTxiaXRzZXQ+CiNpbmNsdWRlPGNocm9ubz4KI2luY2x1ZGU8cmFuZG9tPgojaW5jbHVkZTxleHQvcm9wZT4KLyogb3JkZXJlZF9zZXQKI2luY2x1ZGU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aTw9bjsgaSsrKSBjaW4gPj4gYVtpXS54ID4+IGFbaV0ueTsKfQppbnQgcG9zW21heE5dOwp2b2lkIEF0dGVtcHQxKGludCB0KQp7CiAgICBpZih0ID09IG4xICsgMSkKICAgIHsKICAgICAgICBsbCB4ID0gMCwgeSA9IDA7CiAgICAgICAgaW50IGNudCA9IDA7CiAgICAgICAgZm9yKGludCBpPTE7IGk8PW4xOyBpKyspCiAgICAgICAgewogICAgICAgICAgICBpZihwb3NbaV0pCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIGNudCsrOwogICAgICAgICAgICAgICAgeCArPSBhMVtpXS54OwogICAgICAgICAgICAgICAgeSArPSBhMVtpXS55OwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIHZjMVtjbnRdLnBiKHt4LCB5fSk7CiAgICAgICAgcmV0dXJuOwogICAgfQogICAgZm9yKHBvc1t0XT0wOyBwb3NbdF08PTE7IHBvc1t0XSsrKSBBdHRlbXB0MSh0ICsgMSk7Cn0Kdm9pZCBBdHRlbXB0MihpbnQgdCkKewogICAgaWYodCA9PSBuMiArIDEpCiAgICB7CiAgICAgICAgaW50IGNudCA9IDA7CiAgICAgICAgbGwgeCA9IDAsIHkgPSAwOwogICAgICAgIGZvcihpbnQgaT0xOyBpPD1uMjsgaSsrKQogICAgICAgIHsKICAgICAgICAgICAgaWYocG9zW2ldKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBjbnQrKzsKICAgICAgICAgICAgICAgIHggKz0gYTJbaV0ueDsKICAgICAgICAgICAgICAgIHkgKz0gYTJbaV0ueTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICB2YzJbY250XS5wYih7eCwgeX0pOwogICAgICAgIHJldHVybjsKICAgIH0KICAgIGZvcihwb3NbdF09MDsgcG9zW3RdPD0xOyBwb3NbdF0rKykgQXR0ZW1wdDIodCArIDEpOwp9CnZvaWQgU29sdmUoKQp7CiAgICBuMSA9IG4gLyAyOwogICAgbjIgPSBuIC0gbjE7CiAgICBmb3IoaW50IGk9MTsgaTw9bjE7IGkrKykgYTFbaV0gPSBhW2ldOwogICAgZm9yKGludCBpPTE7IGk8PW4yOyBpKyspIGEyW2ldID0gYVtpICsgbjFdOwogICAgQXR0ZW1wdDEoMSk7CiAgICBBdHRlbXB0MigxKTsKICAgIGZvcihpbnQgaT0xOyBpPD1uMTsgaSsrKQogICAgICAgIHNvcnQodmMxW2ldLmJlZ2luKCksIHZjMVtpXS5lbmQoKSk7CiAgICBmb3IoaW50IGk9MTsgaTw9bjI7IGkrKykKICAgICAgICBzb3J0KHZjMltpXS5iZWdpbigpLCB2YzJbaV0uZW5kKCksIGdyZWF0ZXI8cGFpcjxpbnQsIGludD4+KCkpOwogICAgLy9mb3IocGFpcjxpbnQsIGludD4gdiA6IHZjMls0XSkgY291dCA8PCB2LmZpIDw8ICIgIiA8PCB2LnNlIDw8ICdcbic7cmV0dXJuOwogICAgZm9yKGludCBpPTA7IGk8PW4xOyBpKyspCiAgICB7CiAgICAgICAgZm9yKGludCBrPTA7IGs8PW4yOyBrKyspCiAgICAgICAgewogICAgICAgICAgICBpbnQgcCA9IDA7CiAgICAgICAgICAgIGludCBtdWwxID0gMTsKICAgICAgICAgICAgZm9yKGludCBqPTA7IGo8dmMxW2ldLnNpemUoKTsgaisrKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICB3aGlsZShqICsgMSA8IHZjMVtpXS5zaXplKCkgJiYgdmMxW2ldW2pdLmZpID09IHZjMVtpXVtqICsgMV0uZmkgJiYgdmMxW2ldW2pdLnNlID09IHZjMVtpXVtqICsgMV0uc2UpCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgbXVsMSsrOwogICAgICAgICAgICAgICAgICAgIGorKzsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGludCB4ID0geGcgLSB2YzFbaV1bal0uZmksIHkgPSB5ZyAtIHZjMVtpXVtqXS5zZTsKICAgICAgICAgICAgICAgIHdoaWxlKHAgPCB2YzJba10uc2l6ZSgpICYmIHZjMltrXVtwXS5maSA+IHgpIHArKzsKICAgICAgICAgICAgICAgIHdoaWxlKHAgPCB2YzJba10uc2l6ZSgpICYmIHZjMltrXVtwXS5zZSA+IHkgJiYgdmMyW2tdW3BdLmZpID09IHgpIHArKzsKICAgICAgICAgICAgICAgIGludCBtdWwgPSAwOwogICAgICAgICAgICAgICAgd2hpbGUocCA8IHZjMltrXS5zaXplKCkgJiYgdmMyW2tdW3BdLmZpID09IHggJiYgdmMyW2tdW3BdLnNlID09IHkpCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgbXVsKys7CiAgICAgICAgICAgICAgICAgICAgcCsrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmVzW2kgKyBrXSArPSBtdWwgKiBtdWwxOwogICAgICAgICAgICAgICAgbXVsMSA9IDE7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9CiAgICBmb3IoaW50IGk9MTsgaTw9bjsgaSsrKSBjb3V0IDw8IHJlc1tpXSA8PCAnXG4nOwp9CmludDMyX3QgbWFpbigpCnsKICAgIC8vZnJlb3BlbigieC5pbnAiLCAiciIsIHN0ZGluKTsKICAgIEZhc3RJbnB1dCgpOwogICAgUmVhZElucHV0KCk7CiAgICBTb2x2ZSgpOwp9Cg==