#include <bits/stdc++.h>
using namespace std;
int t, n, m, a[10005], i, ans, d;
int main() {
  scanf("%d", &n);
  scanf("%d", &m);
  t = m;
  for (i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    t = t + a[i];
    ans = max(ans, a[i]);
  }
  d = t / n;
  if (t % n > 0) d++;
  printf("%d %d", max(d, ans), ans + m);
}
