#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, i, d, kmin, kmax, j, l;
  cin >> n >> m;
  l = m;
  long long int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  d = m / n;
  if (n > 1) {
    for (j = n - 2; j >= 0; j--) {
      if (m <= 0) {
        break;
      } else {
        m = m - (a[n - 1] - a[j]);
      }
    }
    if (m <= 0) {
      kmin = a[n - 1];
    } else {
      d = m / n;
      if (m % n != 0) {
        kmin = a[n - 1] + d + 1;
      } else {
        kmin = a[n - 1] + d;
      }
    }
  } else {
    kmin = a[0] + l;
  }
  kmax = a[n - 1] + l;
  cout << kmin << "\t" << kmax;
  return 0;
}
