#include <bits/stdc++.h>

using namespace std;
using ll = long long;
// #define int ll
using PII = pair<ll, ll>;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()

template<typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template<typename T> T &chmax(T &a, const T &b) { return a = max(a, b); }
template<typename T> bool IN(T a, T b, T x) { return a<=x&&x<b; }
template<typename T> T ceil(T a, T b) { return a/b + !!(a%b); }

template<typename T> vector<T> make_v(size_t a) { return vector<T>(a); }
template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts) {
    return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}
template<typename T,typename V> typename enable_if<is_class<T>::value==0>::type
fill_v(T &t, const V &v) { t=v; }
template<typename T,typename V> typename enable_if<is_class<T>::value!=0>::type
fill_v(T &t, const V &v ) { for(auto &e:t) fill_v(e,v); }

template<class S,class T>
ostream &operator <<(ostream& out,const pair<S,T>& a) {
    out<<'('<<a.first<<','<<a.second<<')'; return out;
}
template<class T>
ostream &operator <<(ostream& out,const vector<T>& a){
    out<<'[';
    for(const T &i: a) out<<i<<',';
    out<<']';
    return out;
}
template<class T>
ostream &operator <<(ostream& out, const set<T>& a) {
    out<<'{';
    for(const T &i: a) out<<i<<',';
    out<<'}';
    return out;
}
template<class T, class S>
ostream &operator <<(ostream& out, const map<T,S>& a) {
    out<<'{';
    for(auto &i: a) out<<i<<',';
    out<<'}';
    return out;
}

int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0}; // DRUL
const int INF = 1<<30;
const ll LLINF = 1LL<<60;
const ll MOD = 1000000007;

using R = double;
const R EPS = 1e-10;
int sgn(const R &r) { return (r>EPS) - (r<-EPS); }
int sgn(const R &a, const R &b) { return sgn(a-b); }

// 直線の傾きに単調性があるとき
template<typename T>
struct ConvexHullTrick {
    using P = pair<T,T>;
    deque<P> que;
    bool check(const P &a, const P &b, const P &c) {
        return sgn((b.first-a.first)*(c.second-b.second),(b.second-a.second)*(c.first-b.first)) >= 0;
    }
    T f(const P &p, T x) { return p.first * x + p.second; }
    // ax + b を追加
    void add(T a, T b) {
        P p(a, b);
        while(que.size() >= 2 && check(que[que.size()-2], que.back(), p)) {
            que.pop_back();
        }
        que.push_back(p);
    }
    // 単調性なし
    T query(T x) {
        int lb = -1, ub = que.size()-1;
        while(ub-lb > 1) {
            const int mid = (lb+ub)>>1;
            if(sgn(f(que[mid],x),f(que[mid+1],x))<=0) lb = mid;
            else ub = mid;
        }
        return f(que[ub], x);
    }
};

signed main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);

    ll n, xz, vz;
    cin >> n >> xz >> vz;
    vector<ll> xs(n), vs(n);
    REP(i, n) {
        cin >> xs[i] >> vs[i];
        xs[i] -= xz;
        vs[i] -= vz;
    }

    const R inf = 3e9;
    vector<R> ans(n, inf);
    REP(i, n) {
        if(xs[i] == 0) ans[i] = 0;
        if(xs[i]*vs[i]<0) chmin(ans[i], (R)xs[i]/vs[i]*-1);
    }

    auto solve = [&] {
        // 下側からスタートして傾きが正の人をchtに追加
        using P = pair<R,R>;
        vector<P> v;
        ll ma = 0;
        REP(i, n) {
            if(xs[i]>=0 || vs[i]<=0) continue;
            v.emplace_back(vs[i], xs[i]);
            chmax(ma, vs[i]);
        }
        if(v.size() == 0) return;
        ConvexHullTrick<R> cht;
        sort(ALL(v));
        for(auto p: v) cht.add(p.first, p.second);
        // 上側の人が一番最初に当たる時刻を求める
        REP(i, n) {
            if(xs[i] <= 0 || ma <= vs[i]) continue;
            R lb = 0, ub = inf;
            REP(j, 62) {
                const R mid = (lb+ub)/2;
                if(sgn(cht.query(mid),vs[i]*mid+xs[i]) >= 0) {
                    ub = mid;
                } else {
                    lb = mid;
                }
            }
            chmin(ans[i], ub);
        }
    };

    solve();
    REP(i, n) xs[i] *= -1, vs[i] *= -1;
    solve();

    cout << fixed << setprecision(12);
    REP(i, n) {
        if(ans[i] >= inf) cout << -1 << "\n";
        else cout << ans[i] << "\n";
    }
    cout << flush;

    return 0;
}



Measured memory_bytes: 11564