#include <bits/stdc++.h>
using namespace std;
int a[105], n, m;
int main() {
  cin >> n >> m;
  int maxx = 0, temp = m;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    maxx = max(maxx, a[i]);
  }
  for (int i = 1; i <= n; ++i) {
    if (a[i] < maxx) {
      m -= maxx - a[i];
      a[i] = maxx;
    }
  }
  if (m <= 0) {
    cout << maxx << " " << maxx + temp;
  } else {
    int dlt = (m / n) + (m % n != 0);
    cout << maxx + dlt << " " << maxx + temp;
  }
  return 0;
}
