n, k = [int(i) for i in input().split()] hs = [int(i) for i in input().split()] aboutopt = k // 2 rang = 2000 bestx = 1 besty = 1 besth = 1000000000000000 for i in range(-rang, rang): x = aboutopt + i y = k - x if x > 0 and y > 0: hits = 0 for j in range(n): hits += ((hs[j] - 1) // x) + 1 if hits * besty < besth * y: bestx = x besty = y besth = hits print(bestx, besty)