#include using namespace std; int main() { int n, l, r; cin >> n >> l >> r; vector A(n); for (int i = 0; i < n; i++){ cin >> A[i]; } int ans = 0; sort(A.begin(), A.end()); for (int i = 0; i < n; i++){ vector p, m; for (int j = i; j < n; j++){ if (A[j] > 0){ p.push_back(A[j]); } else { m.push_back(A[j]); } bool ok = true; if ((int) p.size() >= 2 and (long long) p[p.size() - 1] * p[p.size() - 2] > r){ ok = false; } if ((int) p.size() >= 2 and (long long) p[0] * p[1] < l){ ok = false; } if ((int) m.size() >= 2 and (long long) m[0] * m[1] > r){ ok = false; } if ((int) m.size() >= 2 and (long long) m[m.size() - 1] * m[m.size() - 2] < l){ ok = false; } if ((int) p.size() >= 1 and (int) m.size() >= 1 and p[p.size() - 1] * m[0] < l){ ok = false; } if ((int) p.size() >= 1 and (int) m.size() >= 1 and p[0] * m[m.size() - 1] > r){ ok = false; } if (ok){ ans = max(ans, j - i + 1); } } } cout << ans << endl; }