from collections import deque N,M = map(int,input().split()) D = sorted([int(input()) for _ in range(M)]) que = deque(D[:N]) def dist(l,r): if 0<=l