#include <bits/stdc++.h>
using namespace std;
int a[10001], n, k, i, o, big, kol, kolOld, f1, f2, sum;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  cin >> k;
  for (i = 1; i <= n; i++) cin >> a[i];
  if (n == 1)
    cout << a[1] + k << " " << a[1] + k << "\n";
  else {
    big = a[1] - 1;
    for (i = 1; i <= n; i++)
      if (a[i] > big) big = a[i];
    f2 = big + k;
    sort(a + 1, a + 1 + n);
    for (i = 1; i <= n; i++) sum += a[n] - a[i];
    if ((k - sum) % n != 0) o++;
    if (k - sum <= 0)
      cout << big << " " << f2 << "\n";
    else
      cout << big + ((k - sum) / n + o) << " " << f2 << "\n";
  }
  return 0;
}
