#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i, j, x, y, m, c = 0, k;
  cin >> n >> m;
  int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    c += a[i];
  }
  c += m;
  float z = (float)c / n;
  x = ceil(z);
  y = *max_element(a, a + n);
  cout << max(x, y) << " " << y + m << endl;
}
