#include #define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define file freopen("COUNTNUM.inp","r",stdin);freopen("COUNTNUM.out","w",stdout); using namespace std; int main(){ file; int a,b,c,d,x,y,z,e; cin>>a>>b>>c>>d; x=b/c-(a-1)/c; y=b/d-(a-1)/d; e=(c*d)/__gcd(c,d); z=b/e-(a-1)/e; cout<