#include <bits/stdc++.h>
using namespace std;
const int INF = INT_MAX;
const long long INFL = LLONG_MAX;
const long double pi = acos(-1);
int N, M;
int A[105];
int main() {
  ios_base::sync_with_stdio(0);
  cout.precision(15);
  cout << fixed;
  cout.tie(0);
  cin.tie(0);
  cin >> N >> M;
  int ans1, ans2;
  int mx = 0;
  for (int i = 1; i <= N; i++) {
    cin >> A[i];
    mx = max(mx, A[i]);
  }
  ans2 = M + mx;
  int sum = 0;
  for (int i = 1; i <= N; i++) {
    sum += mx - A[i];
  }
  M -= sum;
  if (M < 0) {
    ans1 = mx;
  } else {
    ans1 = mx + (M + N - 1) / N;
  }
  cout << ans1 << " " << ans2 << '\n';
}
