#include <bits/stdc++.h>
using namespace std;
template <typename T>
void read(T &x) {
  x = 0;
  char c = getchar();
  int sgn = 1;
  while (c < '0' || c > '9') {
    if (c == '-') sgn = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  x *= sgn;
}
template <typename T>
void out(T x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x >= 10) out(x / 10);
  putchar(x % 10 + '0');
}
int a[1005];
int main() {
  int n;
  read(n);
  int m;
  read(m);
  for (int i = 0; i < n; i++) read(a[i]);
  sort(a, a + n);
  int total = 0;
  for (int i = 0; i < n - 1; i++) total += a[n - 1] - a[i];
  if (m <= total) {
    cout << a[n - 1] << " " << a[n - 1] + m << endl;
  } else {
    if ((m - total) % n == 0)
      cout << a[n - 1] + (m - total) / n << " " << a[n - 1] + m << endl;
    else
      cout << a[n - 1] + (m - total) / n + 1 << " " << a[n - 1] + m << endl;
  }
  return 0;
}
