#include <bits/stdc++.h>
using namespace std;
vector<pair<long long, long long> > v;
vector<long long> p;
int main() {
  long long n, i, j, x;
  long long m;
  cin >> n;
  cin >> m;
  for (i = 0; i < n; i++) {
    cin >> x;
    p.push_back(x);
  }
  long long z = *max_element(p.begin(), p.end()), sum = 0;
  for (i = 0; i < n; i++) {
    sum += z - p[i];
  }
  if (sum >= m) {
    cout << z << " " << *max_element(p.begin(), p.end()) + m << endl;
  } else {
    long long k = m - sum;
    long long y = k % n;
    long long q = k / n;
    if (y != 0)
      cout << z + q + 1 << " " << *max_element(p.begin(), p.end()) + m << endl;
    else
      cout << z + q << " " << *max_element(p.begin(), p.end()) + m << endl;
  }
  return 0;
}
