#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a.begin(), a.end());
  int K = a[n - 1] + m;
  int x = 0;
  for (int i = 0; i < n; i++) x += a[n - 1] - a[i];
  int k = 0;
  if (m <= x)
    k = a[n - 1];
  else {
    m -= x;
    k = a[n - 1];
    k += m / n;
    if (m % n) k++;
  }
  cout << k << " " << K;
  return 0;
}
