#include <bits/stdc++.h>
using namespace std;
int a[110];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  int max_k = *max_element(a + 1, a + 1 + n) + m;
  for (int i = 1; i <= m; i++) {
    int pos = min_element(a + 1, a + 1 + n) - a;
    a[pos]++;
  }
  int min_k = *max_element(a + 1, a + 1 + n);
  printf("%d %d\n", min_k, max_k);
  return 0;
}
