num = eval(input("输入一个四位数"))
num4 = (num // 1000) ** 4 # 千位数
num3 = ((num % 1000) // 100) ** 4 # 百位数
num1 = ((num // 10) % 10) ** 4 # 十位数
num2 = (num % 10) ** 4 # 个位数
reason = num1 + num2 + num3 + num4
if reason == num:
print("是四叶玫瑰数")
else:
print("不是四叶玫瑰数")