#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, a[105], n, max_n = 0, m, x, maxm = 0, sum = 0;
  cin >> n >> m;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
    if (a[i] > maxm) {
      maxm = a[i];
      max_n = 1;
    } else if (a[i] == maxm) {
      max_n++;
    }
  }
  sum = maxm * n - sum;
  if (m <= sum) {
    cout << maxm << " " << maxm + m << "\n";
  } else {
    x = ceil(((double)m - sum) / n);
    cout << maxm + x << " " << maxm + m << "\n";
  }
}
