#include <bits/stdc++.h>
int main() {
  int t, x, i, z, n, max = 0, s = 0, a[1000], m;
  scanf("%d %d", &n, &m);
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    s += a[i];
    if (max < a[i]) {
      max = a[i];
    }
  }
  max = max + m;
  s = s + m;
  if (s % n == 0) {
    x = s / n;
  } else {
    x = (s / n) + 1;
  }
  for (i = 0; i < n; i++) {
    if (x < a[i]) {
      x = a[i];
    }
  }
  printf("%d %d", x, max);
  return 0;
}
