from sys import stdin def solve(): n, m = map(int, input().split()) x, y = map(int, input().split()) x, y = x - 1, y - 1 ans = 'YES' if furiwake(m, x) == furiwake(m, y) else 'NO' print(ans) def furiwake(m, x): if x // m: return m - 1 - (x % m) else: return x % m def debug(x, table): for name, val in table.items(): if x is val: print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr) return None if __name__ == '__main__': solve()