package main import "fmt" func class(M, x int) int { if x == 0 { return 1 } else if x <= M { return x } else { return 2*M + 1 - x } } func main() { var N, M, X, Y int fmt.Scan(&N, &M, &X, &Y) x := class(M, X%(2*M)) y := class(M, Y%(2*M)) if x == y { fmt.Println("YES") } else { fmt.Println("NO") } }