#include <bits/stdc++.h>
using namespace std;
long long MOD = 998244353;
double eps = 1e-12;
void solve() {
  long long n, x;
  cin >> n >> x;
  int a;
  map<int, int> mr;
  map<int, int> mc;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < x; j++) {
      cin >> a;
      if (a) {
        mr[i + 1]++;
        mc[j + 1]++;
      }
    }
  }
  int k1 = n - mr.size(), k2 = x - mc.size();
  int l = min(k1, k2);
  if (l & 1)
    cout << "Ashish" << endl;
  else
    cout << "Vivek" << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m;
  cin >> n >> m;
  long long s = 0, x = 1;
  long long a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    s = s + a[i];
  }
  s = s + m;
  sort(a, a + n);
  int y = max((s / n + min(x, s % n)), a[n - 1]);
  cout << y;
  cout << " " << a[n - 1] + m << endl;
  return 0;
}
