#include <bits/stdc++.h>
using namespace std;
int n, k, a[110];
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  int tmp = 0;
  int mx = a[n] + k, mn;
  for (int i = 1; i < n; i++) tmp = tmp + (a[n] - a[i]);
  if (tmp >= k)
    mn = a[n];
  else {
    k -= tmp;
    if (k % n == 0)
      mn = a[n] + (k / n);
    else
      mn = a[n] + (k / n) + 1;
  }
  cout << mn << " " << mx;
  return 0;
}
