#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, a, sum = 0, mx = -1;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> a;
    mx = max(a, mx);
    sum += a;
  }
  cout << max(mx, (sum + m + n - 1) / n) << " " << mx + m;
}
