#include <bits/stdc++.h>
using namespace std;

#define rep(i,a,b) for(auto i=(a); i<(b); ++i)
#define trav(a,x) for(auto& a: x)
#define all(x) begin(x),end(x)
#define sz(x) (int)size(x)
#define PB push_back
using ll = long long;
using ld = long double;
using pii = pair<int,int>;
using vi = vector<int>;
using vll = vector<ll>;
using vpii = vector<pii>;

struct edge{int to;};
using graph = vector<vector<edge>>;

int main() {
    cin.sync_with_stdio(0); cin.tie(0);
    cin.exceptions(cin.failbit);

    int n, d, h; cin >> n >> d >> h;

    ld ans = 0.0;

    rep(i, 0, n) {
        int di, hi; cin >> di >> hi;

        ld slope = ((ld)h-hi)/(d-di);
        ans = max(ans, (ld)hi-slope*di);
    }
    cout << fixed << setprecision(15) << ans << "\n";
}

#include <bits/stdc++.h>
#include <ctime>
using namespace std;
#define ll long long
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define P pair<int,int>
using Graph = vector<vector<int>>;

int main() {
    int N; cin >> N;
    string S,T; cin >> S >> T;
    vector<int> s1,t1;
    rep(i,N){
        if(S[i]=='1') s1.push_back(i);
        if(T[i]=='1') t1.push_back(i);
    }
    t1.push_back(2*N);
    ll cnt = 0; int k = 0; bool skip = false;
    rep(i,s1.size()){
        if(skip){
            skip = false; continue;
        }
        int x = s1[i]; int y = t1[k];
        if(x<y){
            if(i==s1.size()-1) cnt = -1;
            else{
                cnt += (ll)s1[i+1] - (ll)x;
                skip = true;
            }
        }
        else{
            cnt += (ll)x-(ll)y; k++;
        }
    }
    if(k!=t1.size()-1) cnt = -1;
    cout << cnt << endl;
}