#include namespace nono { struct Init {}; void solve([[maybe_unused]] const Init& init) { long long n, l, r; std::cin >> n >> l >> r; std::vector a(n); for (int i = 0; i < n; i++) std::cin >> a[i]; std::ranges::sort(a); int mid = std::distance(a.begin(), std::ranges::lower_bound(a, 0)); int right = 0; int ans = 0; auto ok = [&](int left, int right) { if (right - left <= 1) return true; if (right <= mid) { if (r < a[left] * a[left + 1]) return false; if (a[right - 1] * a[right - 2] < l) return false; } else if (mid <= left) { if (a[right - 1] * a[right - 2] > r) return false; if (a[left] * a[left + 1] < l) return false; } else { if (a[right - 1] * a[left] < l) return false; if (mid - left >= 2) { if (a[left] * a[left + 1] > r) return false; } if (right - mid >= 2) { if (a[right - 1] * a[right - 2] > r) return false; } } return true; }; for (int left = 0; left < n; left++) { if (right < left) right = left; while (right < n && ok(left, right + 1)) { right++; } ans = std::max(ans, right - left); } std::cout << ans << std::endl; } } // namespace nono int main() { std::cin.tie(0)->sync_with_stdio(0); int t = 1; nono::Init init; while (t--) nono::solve(init); }