#include <bits/stdc++.h>
using namespace std;
inline long long getnum() {
  char c = getchar();
  long long num, sign = 1;
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') sign = -1;
  for (num = 0; c >= '0' && c <= '9';) {
    c -= '0';
    num = num * 10 + c;
    c = getchar();
  }
  return num * sign;
}
long long A[103], B[103];
int main() {
  int n = getnum();
  long long k = getnum(), ans = 1, mx = 0;
  for (int i = 1; i <= n; i++) A[i] = getnum(), mx = max(mx, k + A[i]);
  for (long long cur = 1; cur <= mx;) {
    long long l = mx;
    for (int i = 1; i <= n; i++) {
      B[i] = (A[i] + cur - 1) / cur;
      if (B[i] == 1)
        l = min(mx, l);
      else
        l = min(l, (A[i] + B[i] - 2) / (B[i] - 1) - 1);
    }
    if (l == cur) {
      long long sum = 0;
      for (int i = 1; i <= n; i++) {
        long long x = cur * (1 + A[i] / cur) - A[i];
        if (x != cur) sum += x;
      }
      if (sum <= k) ans = cur;
    } else {
      long long sum1 = 0, sum2 = 0;
      for (int i = 1; i <= n; i++) {
        long long x = cur * (1 + A[i] / cur) - A[i];
        if (x != cur) sum1 += x;
      }
      cur++;
      for (int i = 1; i <= n; i++) {
        long long x = cur * (1 + A[i] / cur) - A[i];
        if (x != cur) sum2 += x;
      }
      cur--;
      long long dif = sum2 - sum1;
      if (sum1 <= k) ans = cur + min(l - cur, (k - sum1) / dif);
    }
    cur = l + 1;
  }
  cout << ans << endl;
}
