#include <bits/stdc++.h>
using namespace std;
void init() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
int main() {
  init();
  int N, M, i, j, r = 0, v;
  cin >> N >> M;
  vector<int> A(N);
  v = -1;
  for (i = 0; i < N; i++) cin >> A[i], v = max(v, A[i]);
  for (i = 0; i < N; i++) r += v - A[i];
  int a, b;
  b = v + M;
  if (M <= r)
    a = v;
  else
    a = v + (M - r + N - 1) / N;
  cout << a << ' ' << b;
  return 0;
}
