#include using namespace std; struct INIT{ INIT(){ ios::sync_with_stdio(false); cin.tie(0); } }init; int main(){ long long R,C,N,K; cin>>R>>C>>N>>K; cout<<(((R+C+N-2)%N +1==K)?"YES":"NO")<