#include <bits/stdc++.h>
using namespace std;
int a[105], n;
vector<long long> vec;
long long k;
int main() {
  scanf("%d%I64d", &n, &k);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    k += a[i];
    for (int j, k = a[i] - 1; k; k = j - 1) {
      j = a[i] / ((a[i] / k) + !!(a[i] % k));
      if ((a[i] % j)) ++j;
      vec.push_back(j);
    }
    vec.push_back(a[i]);
  }
  sort(vec.begin(), vec.end());
  vec.push_back(1e17);
  vec.erase(unique(vec.begin(), vec.end()), vec.end());
  long long ans = 1;
  for (auto it = vec.begin(); it != vec.end() - 1; ++it) {
    long long l = *it, r = it[1];
    long long tmp = 0;
    for (int i = 1; i <= n; ++i) tmp += a[i] / l + !!(a[i] % l);
    tmp = k / tmp;
    if (l <= tmp && tmp < r) ans = tmp;
  }
  printf("%I64d\n", ans);
  return 0;
}
