import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random #sys.setrecursionlimit(10**9) #n = int(input()) # #alist = [] #s = input() n,l,r = map(int,input().split()) #for i in range(n): # alist.append(list(map(int,input().split()))) alist = list(map(int,input().split())) alist.sort() ans = 1 temp = 1 for i in range(n-1): if l <= alist[i] * alist[i+1] <= r and alist[i] * alist[i+1] > 0: temp += 1 else: ans = max(ans,temp) temp = 1 ans = max(ans,temp) #print(alist) m,p = [],[] z = 0 for i in alist: if i<0: m.append(i) elif i>0: p.append(i) else: z += 1 m.sort() p.sort() for j in range(len(m)): i = m[j] check = 0 for k in range(j,len(m)-1): if not (l <= m[k] * m[k+1] <= r): check = 1 break if check: continue idx = 0 while idx != len(p) - 1 and l <= i * p[idx] <= r: idx += 1 if not (l <= i * p[idx] <= r): idx -= 1 check = 0 for k in range(idx): if not(l <= p[k] * p[k+1] <= r): check = 1 break if check:continue ans = max(ans,len(m)-j+idx+1+ (z if l <= 0 <= r else 0)) #print(m,p,j,idx,len(m)-j+idx+1) print(ans)