import strutils, sequtils iterator readInt(): int {.closure.} = while true: let line = stdin.readLine.split.map(parseInt) for x in line: yield x var input = readInt let n = input() var x = newSeq[int64]() y = newSeq[int64]() for _ in 0..= 2 and is_not_more_than(exclude_box(xy, x_min, y_max - a, a).toSeq, a, k - 1): return true if k >= 3 and is_not_more_than(exclude_box(xy, x_max - a, y_min, a).toSeq, a, k - 1): return true if k >= 3 and is_not_more_than(exclude_box(xy, x_max - a, y_max - a, a).toSeq, a, k - 1): return true false let max_a = max(x.max - x.min, y.max - y.min) var ng = -1i64 ok = max_a while ok - ng > 1: let m = (ok + ng) div 2 if is_not_more_than(xy, m, 3): ok = m else: ng = m echo ok