#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, m;
  cin >> n >> m;
  int mx = 0, sum = 0;
  for (int i = 0; i < n; ++i) {
    int tmp;
    cin >> tmp;
    mx = max(tmp, mx);
    sum += tmp;
  }
  cout << max((sum + m) / n + ((sum + m) % n > 0), mx) << ' ' << mx + m;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
