while True:
    try:
        m, n = map(int, input().split())
        lis = []
        for i in range(m, n + 1):
            add = map(lambda x: int(x)**3, str(i))
            if sum(add) == i:
                print(i, end=" ")
                lis.append(i)  # 将水仙花数放在列表里
        if len(lis) == 0:  # 判断如果水仙花数为0时
            print("no")
    except:
        break