#include <bits/stdc++.h>
using namespace std;
long long k, d[8000000];
int a[105], q;
long long ans;
int n;
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    for (int j = 1; j * j <= a[i]; j++) {
      d[q++] = (a[i] + j - 1) / j;
      d[q++] = j;
    }
    k += a[i];
  }
  sort(d, d + q);
  int u = unique(d, d + q) - d;
  for (long long i = u - 1; i >= 0; i--) {
    long long v = 0;
    for (int j = 1; j <= n; j++) {
      v += ((a[j] + d[i] - 1) / d[i]);
    }
    if (v * d[i] <= k) {
      printf("%I64d\n", k / v);
      break;
    }
  }
  return 0;
}
