#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, t, l, k, p, q, r, a, b, c, d, n1;
  long long int count = 0, count1 = 0, total = 0, ans = 0;
  long long int max1 = INT_MIN;
  long long int temp = 0, temp1;
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  bool flag = true, flag1 = true, flag2 = false, flag3 = false;
  char var;
  string str;
  int m;
  cin >> n >> m;
  int arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n);
  int min1 = arr[n - 1];
  temp = m;
  for (int i = 0; i < n; i++) {
    m -= min(m, min1 - arr[i]);
    if (m == 0) break;
  }
  min1 += ((m + (n - 1)) / n);
  cout << min1 << " " << arr[n - 1] + temp << "\n";
}
