while 1:
    try:
        list = []
        m,n = map(int,input().split())       
        for i in range(m,n+1):
            sum = 0           
            for j in str(i):
                sum += int(j)**3
            if sum == i:
                list.append(str(i))
        if not list:
            print('no')
        else:
            print(' '.join(list))
    except:
        break