#include void check(int *a, int *b); int main(void){ int h, w, n, k, count = 1; scanf("%d %d %d %d", &h, &w, &n, &k); for(;;){ if(w == 1 && h == 1){ if(count == k) printf("YES\n"); else printf("NO\n"); break; } if(h > w) check(&h, &w); else check(&w, &h); count++; if(count == n + 1) count = 1; } return 0; } void check(int *a, int *b){ if(*a == 0){ if(*b != 0) (*b)--; } else (*a)--; }