#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, p;
  cin >> n >> m;
  p = m;
  long long arr[n];
  for (long long i = 0; i < n; i++) {
    cin >> arr[i];
  }
  sort(arr, arr + n);
  long long i, maxi(arr[n - 1]);
  for (i = 0; i < n; i++) {
    if (p > 0 and arr[i] < maxi) {
      p -= (maxi - arr[i]);
    } else
      break;
  }
  if (p <= 0) {
    cout << arr[n - 1] << " " << arr[n - 1] + m;
  } else {
    long long z = p / n;
    if (p % n != 0) z++;
    cout << arr[n - 1] + z << " " << arr[n - 1] + m;
  }
  return 0;
}
