#include <bits/stdc++.h>
using namespace std;
using ll=long long;
#define rep(i,n) for(int i=0;i<n;i++)
int main(){
    cin.tie(0);ios::sync_with_stdio(false);
    ll a,b;
    cin>>a>>b;
    vector<int>primes={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71};
    vector<ll>dp(1<<20);
    dp[0]=1;
    for(ll i=a;i<=b;i++){
        int s=0,t=0;
        rep(k,20){
            if(i%primes[k])s|=(1<<k);
            else t|=(1<<k);
        }
        for(int j=s-1;j>=0;j=(j-1)&s){
            //choose i
            dp[j|t]+=dp[j];
            if(j==0)break;
        }
    }
    ll ans=0;
    for(ll i:dp)ans+=i;
    cout<<ans<<endl;
    return 0;
}
#include <bits/stdc++.h>
// #include <atcoder/all>
// #include "icld.cpp"
using namespace std;
using ll = long long int;
using vi = vector<int>;
using si = set<int>;
using vll = vector<ll>;
using vvi = vector<vector<int>>;
using ss = string;
using db = double;
template<typename T> using minpq = priority_queue <T,vector<T>,greater<T>>;
const int dx[4] = {1,0,-1,0};
const int dy[4] = {0,1,0,-1};
#define V vector
#define pii pair<int,int>
#define pll pair<ll,ll>
#define rep(i,s,n) for(int i=(s);i<(int)(n);i++)
#define rev(i,s,n) for(int i=(s);i>=(int)(n);i--)
#define reciv(v,n) vll (v)((n)); rep(i,0,(n))cin>>v[i]
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define ci(x) cin >> x
#define cii(x) ll x;cin >> x
#define cci(x,y) ll x,y;cin >> x >> y
#define co(x) cout << x << endl
#define pb push_back
#define eb emplace_back
#define rz resize
#define pu push
#define sz(x) int(x.size())
#define vij v[i][j]
// ll P = 1e9+7;
// ll P = 998244353;
// n do -> n*pi/180
#define yn cout<<"Yes"<<endl;else cout<<"No"<<endl
#define YN cout<<"YES"<<endl;else cout<<"NO"<<endl
template<class T>void chmax(T &x,T y){x=max(x,y);}
template<class T>void chmin(T &x,T y){x=min(x,y);}

int main(){
  db x1,a,x2,b;
  cin>>x1>>a>>x2>>b;

  db ans=(a*x2+b*x1)/(a+b);
  printf("%.9lf\n",ans);
}