#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int m;
  cin >> m;
  int a[n];
  for (int i = 0; i < n; ++i) cin >> a[i];
  int ans2 = (*(max_element(a, a + n)) + m);
  int maxi = *(max_element(a, a + n));
  for (int i = 0; i < n; ++i) {
    if (m == 0) break;
    if ((maxi - a[i]) <= m)
      m -= (maxi - a[i]);
    else
      m = 0;
  }
  int ans1 = maxi + m / n;
  if (m % n != 0) ++ans1;
  cout << ans1 << " " << ans2;
  return 0;
}
