#include <bits/stdc++.h>
using namespace std;
long long arr[666666];
long long sum;
long long n, m;
long long ok(long long num) {
  if (n * num - sum - m >= 0)
    return 1;
  else
    return 0;
}
signed main() {
  cin >> n >> m;
  long long maxn = 0;
  long long minx = 99999999999;
  for (long long i = 1; i <= n; i++) {
    cin >> arr[i];
    sum += arr[i];
    minx = min(minx, arr[i]);
    maxn = max(maxn, arr[i]);
  }
  long long ans = 0;
  long long l = 0;
  long long r = maxn + m;
  for (long long i = minx;; i++) {
    if (ok(i)) {
      ans = i;
      break;
    }
  }
  cout << max(ans, maxn) << " " << maxn + m;
  return 0;
}
