import strutils, sequtils var n=stdin.readLine.parseInt freq=newSeq[int](2000) for _ in 0..