#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, a[101], sum = 0, t1, t2, mx = -1;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    sum += a[i];
    if (mx < a[i]) {
      mx = a[i];
    }
  }
  sum += m;
  t1 = sum / n + (sum % n == 0 ? 0 : 1);
  t2 = mx + m;
  if (mx > t1) t1 = mx;
  cout << t1 << " " << t2;
}
