#include<bits/stdc++.h>
using namespace std;
#define VI vector<int>
#define PII pair<int, int>
#define VPI vector<PII>
#define mp make_pair
#define eb emplace_back
#define pb push_back
#define st first
#define nd second
#define endl '\n'
#define debug(x) cerr << #x << " " << x << endl;
#define ll long long

#define int ll

#define ld __float128

const int N = 1e6 + 7;

vector<ld> pocz, kon, pkt;

ld pole(ld a, ld b, ld x, ld y) {
	ld ans = (x * b - y * a);
	if (ans < 0)
		return -ans;
	return ans;
}

ld dist(ld a, ld b, ld x, ld y) {
	return pole(a, b, x, y) / sqrtl(a * a + b * b);
}

bool czynadole(ld a, ld b, ld x, ld y) {
	return (a * x + b * y < 0);
}

void solve(){
	int n, a, b, R2;
	ld R;
	cin >> n >> R2 >> a >> b;
	R = R2;
	R += 2e-4;
	for (int i = 0; i < n; i++) {
		int x, y;
		cin >> x >> y;
		if (dist(a, b, x, y) <= R) {
			ld r = sqrtl(R * R - dist(a, b, x, y) * dist(a, b, x, y));
			ld d2 = x * x + y * y;
			ld h = pole(a, b, x, y) / sqrtl(a * a + b * b);
			ld s = sqrtl(d2 - h * h);
			if (czynadole(a, b, x, y))
				s *= -1;
			pocz.pb(s - r);
			kon.pb(s + r);
			pkt.pb(s - r);
			pkt.pb(s + r);
		}
	}
	sort(pkt.begin(), pkt.end());
	sort(pocz.begin(), pocz.end());
	sort(kon.begin(), kon.end());
	int pozpocz = 0, pozkon = 0;
	int wynik = 0;
	int res = 0;
	for (ld pt : pkt) {
		while(pozpocz < pocz.size() && pocz[pozpocz] <= pt)
			wynik++, pozpocz++;
		res = max(res, wynik);
		while(pozkon < kon.size() && kon[pozkon] <= pt)
			wynik--, pozkon++;
	}
	/*for (auto it : pocz) {
		cout << it << "  ";
	}
	cout << "\n";*/
	cout << res << "\n";
}

int32_t main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	
	int test = 1;
	
	while(test--){
		solve();
	}
	
	return 0;
}


