#include <bits/stdc++.h>
using namespace std;
const int MAXN = 110;
const long long int INF = 1e15;
long long int ceil(long long int a, long long int b) { return (a + b - 1) / b; }
int n;
long long int k;
long long int niz[MAXN];
vector<long long int> v;
long long int f(long long int x) {
  long long int suma = 0;
  for (int i = (0); i < (n); i++) suma += ceil(niz[i], x) * x - niz[i];
  return suma;
}
int provjera(long long int x) {
  long long int suma = f(x);
  if (suma <= k) return 1;
  return 0;
}
int main() {
  scanf("%d %lld", &n, &k);
  for (int i = (0); i < (n); i++) scanf("%lld", &niz[i]);
  for (int i = (0); i < (n); i++) {
    for (int j = 1; j * j <= niz[i]; j++) {
      v.push_back(j);
      v.push_back(ceil(niz[i], j));
    }
  }
  long long int rj = 0;
  v.push_back(INF);
  sort(v.begin(), v.end());
  v.resize(unique(v.begin(), v.end()) - v.begin());
  for (int i = (0); i < ((int)v.size() - 1); i++) {
    long long int lo = v[i], hi = v[i + 1] - 1;
    while (lo < hi) {
      long long int mid = (lo + hi + 1) / 2;
      if (provjera(mid))
        lo = mid;
      else
        hi = mid - 1;
    }
    if (!provjera(lo)) continue;
    rj = lo;
  }
  printf("%lld\n", rj);
  return 0;
}
