#include <bits/stdc++.h>   using namespace std;   int x, y, mn, mx, ai;   int an[200], ax[200];   int main() {     cin >> x >> y;     for (int i = 1; i <= x; i++) {       cin >> ai;       an[i] = ax[i] = ai;     }     for (int i = 1; i <= y; i++) {       sort(an + 1, an + 1 + x);       an[1]++;     }     sort(ax + 1, ax + 1 + x);     ax[x] += y;     sort(an + 1, an + 1 + x);     mn = an[x];     mx = ax[x];     cout << mn <<     << mx;     return 0;   }   