N, L, R = map(int, input().split()) A = sorted(list(map(int, input().split()))) ans = 1 for i in range(N-1): for j in range(i+1, N): a = A[i]*A[j] b = A[i]*A[i+1] c = A[j]*A[j-1] if L <= min(a, b, c) <= max(a, b, c) <= R: ans = max(ans, j-i+1) print(ans)