#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  sort(arr, arr + n, greater<int>());
  int max_k = arr[0] + m;
  int min_k;
  for (int i = 0; i < n; i++) {
    if (m == 0) {
      min_k = arr[0];
      break;
    } else {
      int temp = arr[i];
      arr[i] = min(arr[i] + m, arr[0]);
      m = m - (arr[0] - temp);
    }
  }
  if (m > 0) {
    if (m >= n) {
      arr[0] = arr[0] + m / n;
      m = m - (m / n) * n;
    }
    if (m % n != 0) {
      arr[0]++;
    }
  }
  min_k = arr[0];
  cout << min_k << " " << max_k;
}
