#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n;
  cin >> m;
  int x = m;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    v.push_back(x);
  }
  int me = *max_element(v.begin(), v.end());
  for (int i = 0; i < n; i++) {
    if (v[i] < me) {
      if (m >= me - v[i]) {
        m = m - (me - v[i]);
        v[i] = me;
      } else {
        v[i] += m;
        m = 0;
      }
    }
  }
  cout << me + m / n + (m % n == 0 ? 0 : 1) << " ";
  cout << me + x;
  return 0;
}
