#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
const int inf = 1e9 + 5;
const double eps = 1e-2;
const double pi = acos(-1.0);
int a[maxn];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  sort(a + 1, a + n + 1);
  int t1 = a[n], t2 = 0;
  for (int i = 1; i <= n; i++) t2 += t1 - a[i];
  int x = m - t2, k1;
  if (m > t2)
    k1 = (x + n - 1) / n + t1;
  else
    k1 = t1;
  int k2 = t1 + m;
  printf("%d %d\n", k1, k2);
  return 0;
}
