while True: try: m,n=map(int,input().split()) k=[] for i in range(m,n+1): i=str(i) a=int(i[0]) b=int(i[1]) c=int(i[2]) i=int(i) if a**3+b**3+c**3==i: k.append(i) else: continue if len(k)==0: print('no') else: for i in k: print(i,end=' ') print() except: break