#include <bits/stdc++.h>
using namespace std;
const int N = 110;
int a[N];
int n, m;
int main() {
  cin >> n;
  cin >> m;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  int maxx = a[n - 1];
  int sum = 0;
  for (int i = 0; i < n; i++) sum += a[i];
  int minn = (sum + m + n - 1) / n;
  cout << max(maxx, minn) << ' ' << maxx + m << endl;
  return 0;
}
