import sequtils,strutils,sugar,algorithm,bitops,math proc scanf*(formatstr: cstring){.header: "", importc: "scanf", varargs.} proc nextInt*(): int32 = scanf("%d", addr result) proc nextLong*(): int64 = scanf("%lld", addr result) proc nextFloat*(): float64 = scanf("%lf", addr result) proc getchar*(): char {.header: "", importc: "getchar".} proc nextChar*(): char = while true: let c = getchar() if c.ord >= 0x21 and c.ord <= 0x7e: result = c break proc nextstr*(): string = var ok = false while true: let c = getchar() if c.ord >= 0x21 and c.ord <= 0x7e: ok = true elif ok: break if ok: result.add(c) template `max=`*(x, y) = x = max(x, y) template `min=`*(x, y) = x = min(x, y) template times*(n: int; body: untyped): untyped = (for _ in 0 ..< n: body) proc `<-`*[T, U](a: var T, b: U): T = a = b return a template `<<`(a: untyped, b: int): untyped = (a shl b) template `>>`(a: untyped, b: int): untyped = (a shr b) let a = newSeqWith(4, nextint()) if a[0] < a[1] and a[2] > a[3]: echo "YES" else: echo "NO"