#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5 + 100;
int arr[MAXN], n, m;
bool f(int k) {
  int need = 0;
  for (int i = (int)0; i < (int)n; ++i) {
    need += (k - arr[i]);
  }
  return need >= m;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cin >> n >> m;
  for (int i = (int)0; i < (int)n; ++i) cin >> arr[i];
  int mink, maxk = m + *max_element(arr, arr + n);
  int low = *max_element(arr, arr + n), high = 1e7;
  while (low <= high) {
    int mid = (low + high) >> 1;
    if (f(mid)) {
      mink = mid;
      high = mid - 1;
    } else {
      low = 1 + mid;
    }
  }
  cout << mink << " " << maxk;
  return 0;
}
