#include <bits/stdc++.h>
template <typename T>
std::vector<T> readVectorSz(int sz) {
  std::vector<T> res;
  res.reserve(sz);
  for (int i = 0; i < sz; ++i) {
    T tmp;
    std::cin >> tmp;
    res.push_back(std::move(tmp));
  }
  return res;
}
template <typename T>
std::vector<T> readVector() {
  int sz;
  std::cin >> sz;
  return readVectorSz<T>(sz);
}
std::vector<std::vector<int>> readGraphDir(int vertices, int edges) {
  auto g = std::vector<std::vector<int>>(vertices, std::vector<int>());
  for (int i = 0; i < edges; ++i) {
    int u, v;
    std::cin >> u >> v;
    --u;
    --v;
    g[u].push_back(v);
  }
  return g;
}
std::vector<std::vector<int>> readGraphUn(int vertices, int edges) {
  auto g = std::vector<std::vector<int>>(vertices, std::vector<int>());
  for (int i = 0; i < edges; ++i) {
    int u, v;
    std::cin >> u >> v;
    --u;
    --v;
    g[u].push_back(v);
    g[v].push_back(u);
  }
  return g;
}
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(NULL);
  int n, m;
  std::cin >> n >> m;
  auto vec = readVectorSz<int>(n);
  int max = *std::max_element(vec.cbegin(), vec.cend());
  int rem = 0;
  for (auto i : vec) rem += max - i;
  int m_new = std::max(0, m - rem);
  std::cout << max + ((m_new + n - 1) / n) << ' ' << max + m << '\n';
}
