#include <bits/stdc++.h>
using namespace std;
const int con = 1e9;
static const int INF = 0x3f3f3f3f;
static const int MOD = 1e9 + 7;
int main() {
  int n, m, sum = 0;
  scanf("%d", &n);
  scanf("%d", &m);
  int arr[n];
  for (int i = 0; i < n; i++) scanf("%d", &arr[i]), sum += arr[i];
  sort(arr, arr + n);
  cout << max(arr[n - 1], (sum + m + n - 1) / n) << " " << arr[n - 1] + m;
}
