#include <bits/stdc++.h>
int main() {
  int n, m, i, min_k, max_k, sum = 0, max = 0, r;
  scanf("%d%d", &n, &m);
  int ar[n], min = 100000;
  for (i = 0; i < n; i++) {
    scanf("%d", &ar[i]);
    sum += ar[i];
    if (ar[i] > max) max = ar[i];
    if (ar[i] < min) min = ar[i];
  }
  max_k = max + m;
  sum += m;
  if (sum % n != 0) {
    r = sum % n;
    sum += n - r;
  }
  if (max >= sum / n)
    min_k = max;
  else
    min_k = sum / n;
  printf("%d %d", min_k, max_k);
}
