#include <bits/stdc++.h>
using namespace std;
const int N = 105;
int a[N], n, m;
int main() {
  scanf("%d%d", &n, &m);
  int mx = 0, mak, mik, sum = 0;
  for (int i = 1; i <= n; i++)
    scanf("%d", &a[i]), mx = max(mx, a[i]), sum += a[i];
  mak = mx + m;
  if (n * mx >= sum + m)
    mik = mx;
  else {
    m = m + sum - mx * n;
    int ad = m / n;
    if (m % n) ad++;
    mik = mx + ad;
  }
  printf("%d %d\n", mik, mak);
  return 0;
}
