def f(x,base):
res=0
while x>0:
res +=1
x//=base
return res
lst=[]
for i in range(331,8752):
if f(i,16)==len(str(i)) and i%5==0 and i%25!=0:
lst.append(i)
print(len(lst),lst[0])
while x>0:
res +=1
x//=base
return res