#include <bits/stdc++.h>
using namespace std;
long long n, m;
long long a[105];
int main() {
  cin >> n >> m;
  long long mx = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    mx = max(mx, a[i]);
  }
  long long ans2 = mx + m;
  long long sum = 0;
  for (int i = 1; i <= n; i++) {
    sum += (mx - a[i]);
    a[i] = mx;
  }
  long long ans1 = mx;
  if (sum >= m) {
    printf("%lld %lld\n", ans1, ans2);
  } else {
    m -= sum;
    if (m % n == 0) {
      printf("%lld %lld\n", ans1 + m / n, ans2);
    } else {
      printf("%lld %lld\n", ans1 + m / n + 1, ans2);
    }
  }
  return 0;
}
