start = 5300
stop = 5500

for i in range(start, stop+1):
    res = str(i*i) + str(i*i*i)
    if '0' in res and '1' in res and '2' in res and '3' in res and '4' in res and '5' in res and '6' in res and '7' in res and '8' in res and '9' in res:
        print(i, end=', ')