#include <bits/stdc++.h>
using namespace std;
int main() {
  int num, extra, min, max, temp = 0;
  cin >> num >> extra;
  int arr[num];
  for (int i = 0; i < num; i++) {
    cin >> arr[i];
  }
  sort(arr, arr + num);
  for (int i = 0; i < num; i++) {
    temp += arr[num - 1] - arr[i];
  }
  if (temp >= extra) {
    min = arr[num - 1];
  } else
    min = arr[num - 1] + ceil((double)(extra - temp) / num);
  max = arr[num - 1] + extra;
  cout << min << " " << max;
}
