#include using namespace std; typedef long long ll; typedef pair pii; typedef pair pll; #define X first #define Y second #define SZ(a) ((int)a.size()) #define ALL(v) v.begin(), v.end() #define pb push_back ll arr[5005]; int main() { ios::sync_with_stdio(0), cin.tie(0); int n; ll l, r; cin >> n >> l >> r; for (int i = 1; i <= n; ++i) cin >> arr[i]; int ans = 1; sort(arr + 1, arr + n + 1); auto in_itv = [&](ll x) { return clamp(x, l, r) == x; }; for (int i = 1; i <= n; ++i) { for (int j = i + 1; j <= n; ++j) { if (in_itv(arr[i] * arr[i + 1]) && in_itv(arr[i] * arr[j]) && in_itv(arr[j - 1] * arr[j])) ans = max(ans, j - i + 1); } } cout << ans << "\n"; }