#include <bits/stdc++.h>
using namespace std;
int a[105];
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n, m, max = 0, sum = 0, ans = 0;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (max < a[i]) max = a[i];
    sum += a[i];
  }
  if (max * n - sum > m)
    ans = max;
  else {
    sum += m;
    ans = ceil((double)sum / n);
  }
  cout << ans << " " << max + m << '\n';
  return 0;
}
