#include <bits/stdc++.h>
using namespace std;
const int MAXN = 105;
vector<long long> sv;
int a[MAXN];
long long lim = 0;
int main() {
  int n;
  long long k;
  scanf("%d%lld", &n, &k);
  lim = k;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    lim += a[i];
  }
  long long last, ans = 0;
  for (long long d = 1; d <= 1000000000; d = last + 1) {
    long long tot = 0;
    last = 0x3f3f3f3f3f3f3f3f;
    for (int i = 1; i <= n; i++) {
      if (a[i] > d) {
        last = min(last, (a[i] - 1) / ((a[i] - 1) / d));
      }
    }
    for (int i = 1; i <= n; i++) {
      tot += (a[i] - 1) / d + 1;
    }
    long long tmp = lim / tot;
    if (tmp <= last && tmp >= d) ans = max(ans, tmp);
  }
  printf("%lld\n", ans);
  return 0;
}
