import sequtils,strutils,math let n: int = stdin.readLine.parseInt var a: seq[int] for i in 0..