#include <bits/stdc++.h>
using namespace std;
int a[105], b;
int x, y, sum = 0;
int main() {
  cin >> x >> y;
  for (int i = 0; i < x; i++) cin >> a[i];
  sort(a, a + x);
  for (int i = 0; i < x; i++) sum += a[x - 1] - a[i];
  if (y <= sum)
    cout << a[x - 1] << " " << a[x - 1] + y << endl;
  else {
    if ((y - sum) % x == 0)
      b = (y - sum) / x;
    else
      b = (y - sum) / x + 1;
    cout << a[x - 1] + b << " " << a[x - 1] + y << endl;
  }
  return 0;
}
