#define _CRT_SECURE_NO_WARNINGS
#define _SILENCE_CXX17_C_HEADER_DEPRECATION_WARNING
#include <bits/stdc++.h>
using namespace std;
const int N = 1e3;
int a[N];
int main()
{
    int n, m;
    scanf("%d%d", &n, &m);
    for (int i = 0; i < n; i++)
        scanf("%d", a + i);
    int mx = *max_element(a, a + n) + m;
    int mn = max(*max_element(a, a + n), (accumulate(a, a + n, m) + n - 1) / n);
    printf("%d %d", mn, mx);
    return 0;
}