#include #include int cmp_ll (const void *ap, const void *bp) { long long a = *(long long *)ap; long long b = *(long long *)bp; if (a < b) { return -1; } if (a > b) { return 1; } return 0; } int main () { int n = 0; long long l = 0LL; long long r = 0LL; long long a[5000] = {}; int res = 0; int ans = 1; res = scanf("%d", &n); res = scanf("%lld", &l); res = scanf("%lld", &r); for (int i = 0; i < n; i++) { res = scanf("%lld", a+i); } qsort(a, n, sizeof(long long), cmp_ll); for (int i = 0; i < n-1; i++) { for (int j = i+1; j < n; j++) { if (j-i >= ans && a[i]*a[i+1] >= l && a[i]*a[i+1] <= r && a[i]*a[j] >= l && a[i]*a[j] <= r && a[j]*a[j-1] >= l && a[j]*a[j-1] <= r) { ans = j-i+1; } } } printf("%d\n", ans); return 0; }