#include <bits/stdc++.h>
using namespace std;
const int maxn = 105;
int A[maxn];
int main() {
  int N = 0;
  int m = 0;
  cin >> N >> m;
  int k = 0;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    k = max(k, A[i]);
  }
  int sum = 0;
  for (int i = 0; i < N; i++) {
    sum += (k - A[i]);
  }
  if (N == 1) {
    cout << m + A[0] << " " << m + A[0] << endl;
    return 0;
  }
  if (sum >= m) {
    cout << k << " " << k + m << endl;
  } else {
    int t1 = (m - sum) / N;
    int t2 = (m - sum) % N;
    if (t2 != 0) t1++;
    cout << k + t1 << " " << k + m << endl;
  }
  return 0;
}
