#include using namespace std; typedef long long ll; typedef vector vi; typedef pair pii; #define pb push_back #define mp make_pair #define fi first #define se second int main() { ll h,w,n,k; cin>>h>>w>>n>>k; ll p=((h-1)+(w-1)+1)%n; if(!p)p=n; if(k==p)cout<<"YES"<