#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
#pragma region 입출력 속도향상
#define FAST_IO() \
{\
ios::sync_with_stdio(false);\
cin.tie(NULL); \
cout.tie(NULL); \
}\
#pragma endregion
vector<long> v;
int main()
{
FAST_IO();
long k, n;
cin >> k >> n;
v.resize(k);
for (int i = 0; i < k; i++)
cin >> v[i];
sort(v.begin(), v.end());
long l = 1, r = v[k - 1];
long res = 0;
while (l <= r)
{
long mid = (l + r) / 2;
long sum = 0;
for (int i = 0; i < k; i++)
sum += v[i] / mid;
if (sum >= n)
{
res = mid;
l = mid + 1;
}
else
r = mid - 1;
}
cout << res;
return 0;
}