while True: try: count = 0 m, n = map(int, input().split()) for i in range(m, n + 1): i = str(i) if pow(int(i[0]), 3) + pow(int(i[1]), 3) + pow(int(i[2]), 3) == int(i): print(i, end=' ') count += 1 if count == 0: print('no') except: break