#include <bits/stdc++.h>
using namespace std;
void out(int *a, int *b) {
  for (int *i = a; i != b; ++i) cout << (*i) << " ";
}
const int N = 110;
int n, m, a[N], mx;
int check(int x) {
  int ret = 0;
  for (int i = 1; i <= n; ++i) ret += x - a[i];
  return ret;
}
int main() {
  scanf("%d", &n);
  scanf("%d", &m);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  for (int i = 1; i <= n; ++i) mx = max(mx, a[i]);
  int ret = 0;
  for (int l = mx, r = 20000, mid = (l + r) >> 1; l <= r; mid = (l + r) >> 1)
    if (check(mid) >= m)
      ret = mid, r = mid - 1;
    else
      l = mid + 1;
  printf("%d %d\n", ret, mx + m);
}
