#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<vector>
#include<map>
#include<queue>
#include<algorithm>
using namespace std;
#define inf 0x3f3f3f3f
typedef long long LL;
const LL mod = 1e9 + 7;
long long ax[100010];
map<long long,int>mp;
int main(void) {
LL n, k;
scanf("%lld%lld", &n, &k);
for (int i = 0; i < n; i++) {
scanf("%lld", &ax[i]);
}
mp.clear();
long long x = -1;
long long maxx = -1;
for (int i = 1; i <= k; i++) {
for (int z = 0; z < n; z++) {
if (ax[z] % i == 0) {
long long num = ax[z] / i;
mp[num]++;
if (mp[num] > maxx) {
x = num;
maxx = mp[num];
}
}
}
}
long long sum = 0;
for (int i = 0; i < n; i++) {
if (ax[i] % x == 0&&ax[i]/x<=k) {
sum += 1;
}
}
printf("%lld\n", sum);
return 0;
}