#include <bits/stdc++.h>
using namespace std;
const int N = 1004;
int a[N];
int main() {
  int n;
  scanf("%d", &n);
  int m;
  scanf("%d", &m);
  int i;
  int sum = 0;
  for (i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    sum = sum + a[i];
  }
  int mx = 0;
  for (i = 1; i <= n; i++) mx = max(mx, a[i]);
  int mn = mx;
  while (1) {
    if (mn * n >= sum + m) {
      printf("%d ", mn);
      break;
    } else
      mn++;
  }
  printf("%d\n", mx + m);
  return 0;
}
