#include <bits/stdc++.h>
using namespace std;
const double pi = 2 * acos(0.0);
double inff = 1.0 / 0.0;
long long int x, y, n, m, i, t, j, k, w, u, q, c;
long long int a[1001];
int main(void) {
  ios::sync_with_stdio(false), cout.tie(0), cin.tie(0);
  ;
  cin >> n;
  cin >> m;
  for (i = (int)1; i < (int)n + 1; i++) {
    cin >> a[i];
  }
  k = *max_element(a + 1, a + 1 + n);
  for (i = (int)1; i < (int)n + 1; i++) {
    u += k - a[i];
  }
  t = *max_element(a + 1, a + 1 + n) + m;
  if (m - u > 0) {
    w = k + (m - u) / n + ((m - u) % n ? 1 : 0);
  } else
    w = k;
  cout << w << " " << t << "\n";
}
