L = ["answer"]
x = "YES"
y = "NO"
while True:
try:
the_input = input("Please enter 3 numbers or type (answer) for hidden rule: ")
if the_input == L[0]:
print("Hidden rule: Each number is twice as large as the last number")
for h in L:
print(h)
break
else:
num, num2, num3 = the_input.split()
first_num = int(num)
second_num = int(num2)
third_num = int(num3)
if first_num < second_num and second_num < third_num:
print(x)
L.append(the_input + " "+ x)
else:
print(y)
L.append(the_input + " "+ y)
except:
continue