#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m;
  cin >> n >> m;
  int a[n];
  for (int l = 0; l < n; l++) {
    cin >> a[l];
  }
  int max = INT_MIN;
  for (int i = 0; i < n; ++i) {
    if (max < a[i]) max = a[i];
  }
  int diffSum = 0;
  for (int i = 0; i < n; ++i) {
    diffSum += max - a[i];
  }
  if (diffSum > m) {
    cout << max << " ";
  } else {
    int x = m - diffSum;
    if (x % n == 0) {
      cout << (max + x / n) << " ";
    } else {
      cout << (max + x / n + 1) << " ";
    }
  }
  cout << max + m << endl;
}
