#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
long long ce(long long x, long long y) { return (x + y - 1) / y; }
int main() {
  int n;
  long long k;
  cin >> n >> k;
  vector<long long> v(n), v2;
  for (auto &i : v) {
    cin >> i;
    k += i;
  }
  for (auto x : v) {
    for (int i = 1; i * i <= x; i++) {
      v2.push_back(i);
      v2.push_back(ce(x, i));
    }
  }
  sort(v2.begin(), v2.end());
  auto it = unique(v2.begin(), v2.end());
  v2.resize(it - v2.begin());
  long long ans = 1;
  for (int x : v2) {
    long long tot = 0;
    for (int y : v) tot += ce(y, x);
    long long d = k / tot;
    if (x <= d && ans < d) ans = d;
  }
  cout << ans;
  return 0;
}
