#include #include #include #include #include int main(void) { long long int gyou,retu,ppl,loser; scanf("%lld %lld %lld %lld",&gyou,&retu,&ppl,&loser); if((gyou*retu-1)%ppl+1==loser) { printf("YES"); } else { printf("NO"); } }