#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, m;
  cin >> n >> m;
  long long arr[n];
  long long sum = 0;
  for (long long i = 0; i < n; i++) {
    cin >> arr[i];
    sum += arr[i];
  }
  sort(arr, arr + n);
  long long maxK = arr[n - 1] + m;
  long long minK = max(arr[n - 1], (sum + m + n - 1) / n);
  cout << minK << " " << maxK << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin.exceptions(cin.failbit);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
