#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
const long long mod = 1000000007;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
vector<long long> v;
long long a[105];
int main() {
  long long n, k;
  scanf("%I64d%I64d", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%I64d", &a[i]);
    for (long long j = 1; j * j <= a[i]; j++) {
      v.push_back(j);
      long long t = (a[i] + j - 1) / j;
      v.push_back(t);
    }
    k += a[i];
  }
  v.push_back(INF);
  long long ans = 1;
  sort(v.begin(), v.end());
  int m = unique(v.begin(), v.end()) - v.begin() - 1;
  for (int i = 0; i < m; i++) {
    long long l = v[i], r = v[i + 1];
    long long tmp = 0;
    for (int i = 1; i <= n; i++) {
      tmp += (a[i] + l - 1) / l;
    }
    long long d = k / tmp;
    if (d >= l && d < r) {
      ans = max(d, ans);
    }
  }
  cout << ans << endl;
  return 0;
}
