#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int arr[n];
  int ma = -1;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    ma = max(ma, arr[i]);
  }
  int maxa = ma + m;
  for (int i = 0; i < n; i++) {
    m -= (ma - arr[i]);
  }
  int tmp = 0;
  if (m > 0) {
    tmp = m / n;
    m %= n;
  }
  if (m > 0) tmp++;
  cout << ma + tmp << " " << maxa << endl;
  return 0;
}
