L,R,M,K=map(int,input().split()) if L*K%M==0 or R*K%M==0 or L*K//M