#include<iostream>
#include<string>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<utility>
#include<map>
using namespace std;
typedef double ll;
//const ll mod = 1000000007;
//const ll INF = mod * mod;
typedef pair<ll, ll> P;

#define rep(i,n) for(int i=0;i<n;i++)
#define rep1(i,n) for(int i=1;i<=n;i++)
#define all(x) (x).begin(),(x).end()
#define stop char nyaa; cin>>nyaa;
const ll eps = 1e-2;
struct Line {
	ll a, b;
	Line(ll a = 0, ll b = -4e18) :a(a), b(b) {}
	ll get(ll x) {
		return a * x + b;
	}

};
bool cmp(Line& l, Line& r, ll x) {
	if (l.a == r.a)return l.b >= r.b;
	if (l.a > r.a)return x >= (r.b - l.b) / (l.a - r.a);
	return x <= (r.b - l.b) / (l.a - r.a);

}
Line chmax(Line& l, Line r, ll x) {
	if (cmp(l, r, x))return l;
	else return r;
}
struct ConvexHullTrick {

	struct Node {
		Line l;
		Node *lhs, *rhs;
		Node(Line l) :l(l), lhs(nullptr), rhs(nullptr) {}
		Node() : lhs(nullptr), rhs(nullptr) {
			l = Line();
		}

	};
	const ll mi = 0, ma = 1LL << 31;
	Node *root = nullptr;
	ConvexHullTrick() {}
	Node* insert(Node *p, ll lb, ll ub, Line& l) {
		if (!p)return new Node(l);
		if (cmp(p->l, l, lb) && cmp(p->l, l, ub))return p;
		if (!cmp(p->l, l, lb) && !cmp(p->l, l, ub)) {
			p->l = l;
			return p;
		}
		ll mid = (lb + ub) / 2;
		if (cmp(l, p->l, mid))swap(p->l, l);
		if (cmp(l, p->l, lb)) {
			p->lhs = insert(p->lhs, lb, mid, l);
		}
		else {
			p->rhs = insert(p->rhs, mid, ub, l);

		}
		return p;
	}
	void insert(ll a, ll b) {
		Line l(a, b);
		root = insert(root, mi, ma, l);
	}
	ll query(Node* p, ll lb, ll ub, ll t) {
		if (!p)return -4e18;
		if (lb == ub)return p->l.get(t);
		ll mid = (lb + ub) / 2;
		if (t <= mid)return max(p->l.get(t), query(p->lhs, lb, mid, t));
		else return max(p->l.get(t), query(p->rhs, mid, ub, t));

	}
	ll query(ll x) {
		return query(root, mi, ma, x);
	}
	Line query2(Node* p, ll lb, ll ub, ll t) {
		if (!p)return Line{ 0,-4e18 };
		if (lb == ub)return p->l;
		ll mid = (lb + ub) / 2;
		if (t <= mid)return chmax(p->l, query2(p->lhs, lb, mid, t), t);
		else return chmax(p->l, query2(p->rhs, mid, ub, t), t);

	}
	Line query2(ll x) {
		return query2(root, mi, ma, x);
	}
};

void solve() {
	cout << fixed << setprecision(10);
	int n;
	cin >> n;
	ll xx, vv;
	cin >> xx >> vv;
	ConvexHullTrick lc, rc;
	rc.insert(-vv, -xx);
	lc.insert(vv, xx);
	vector<ll> x(n), v(n);
	rep(i, n) {
		cin >> x[i] >> v[i];
		if (x[i] < xx) {
			lc.insert(v[i], x[i]);
		}
		else {
			rc.insert(-v[i], -x[i]);
		}
	}
	rep(i, n) {

		ll ok = 1LL << 31, ng = 0;
		if (x[i] < xx) {
			rep(_, 64) {
				ll mid = (ok + ng) / 2;
				ll ret = -rc.query(mid);
				if (v[i] * mid + x[i] >= ret)ok = mid;
				else ng = mid;
			}
			if (ok >= (1LL << 31) - 1)cout << -1 << "\n";
			else {
				auto ret = rc.query2(ok);
				//cout << ret.a << endl;
				cout << abs((x[i] + ret.b) / (ret.a + v[i])) << "\n";
			}
		}
		else {
			rep(_, 64) {
				ll mid = (ok + ng) / 2;
				ll ret = lc.query(mid);
				if (v[i] * mid + x[i] <= ret)ok = mid;
				else ng = mid;
			}
			if (ok >= (1LL << 31) - 1)cout << -1 << "\n";
			else {
				auto ret = lc.query2(ok);
				//cout << ok << endl;
				//cout << ret.a <<" "<<ret.b << endl;
				cout << abs((x[i] - ret.b) / (v[i] - ret.a)) << "\n";
			}
		}
	}
}

signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	solve();
	//stop
	return 0;
}






Measured memory_bytes: 15368