#include using namespace std; int main(){ long a,b,c,d;cin>>a>>b>>c>>d; cout << (((!((a*b)%c)?c:(a*b)%c)==d)?"YES":"NO") << endl; }