#include <bits/stdc++.h>
using namespace std;
int n, m, a[111], maxx;
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; ++i) cin >> a[i];
  maxx = a[0];
  for (int i = 1; i < n; ++i) maxx = max(maxx, a[i]);
  int tot = 0;
  for (int i = 0; i < n; ++i) tot += maxx - a[i];
  int res2 = maxx + m;
  m -= tot;
  if (m < 0) m = 0;
  int res1 = maxx + m / n;
  if (m % n) ++res1;
  cout << res1 << " " << res2;
  return 0;
}
