#include <bits/stdc++.h>
using namespace std;
int n, m, a[105];
int minn = (1 << 30), maxx = 0;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    maxx = max(maxx, a[i]);
  }
  for (int i = 1; i <= maxx + m + 3; i++) {
    int cnt = 0;
    bool flag = 0;
    for (int j = 1; j <= n; j++) {
      if (a[j] > i) {
        flag = 1;
        break;
      }
      cnt += i - a[j];
    }
    if (flag) continue;
    if (cnt >= m) {
      cout << i << " ";
      break;
    }
  }
  cout << maxx + m;
  return 0;
}
