#分享一种最蠢的方法,真穷举法
while True:
try:
list1=input().split()
list6=['+','-','*','/']
flag=False
for ii in list1:
list2=list1.copy()
list2.remove(ii)
for jj in list2:
list3=list2.copy()
list3.remove(jj)
for xx in list3:
list4=list3.copy()
list4.remove(xx)
list5=[ii,jj,xx,list4[0]]
for i in list6:
for j in list6:
for x in list6:
try:
m0=eval('('+str(list5[0])+i+str(list5[1])+')'+j+str(list5[2])+x+str(list5[3]))
except ZeroDivisionError:
m0=0
try:
m1=eval(str(list5[0])+i+'('+str(list5[1])+j+str(list5[2])+')'+x+str(list5[3]))
except ZeroDivisionError:
m1=0
try:
m2=eval(str(list5[0])+i+str(list5[1])+j+'('+str(list5[2])+x+str(list5[3])+')')
except ZeroDivisionError:
m2=0
try:
m3=eval('('+str(list5[0])+i+str(list5[1])+')'+j+'('+str(list5[2])+x+str(list5[3])+')')
except ZeroDivisionError:
m3=0
try:
m4=eval('('+str(list5[0])+i+str(list5[1])+j+str(list5[2])+')'+x+str(list5[3]))
except ZeroDivisionError:
m4=0
try:
m5=eval(str(list5[0])+i+'('+str(list5[1])+j+str(list5[2])+x+str(list5[3])+')')
except ZeroDivisionError:
m5=0
try:
m6=eval('('+'('+str(list5[0])+i+str(list5[1])+')'+j+str(list5[2])+')'+x+str(list5[3]))
except ZeroDivisionError:
m6=0
try:
m7=eval('('+str(list5[0])+i+'('+str(list5[1])+j+str(list5[2])+')'+')'+x+str(list5[3]))
except ZeroDivisionError:
m7=0
try:
m8=eval(str(list5[0])+i+'('+'('+str(list5[1])+j+str(list5[2])+')'+x+str(list5[3])+')')
except ZeroDivisionError:
m8=0
try:
m9=eval(str(list5[0])+i+'('+str(list5[1])+j+'('+str(list5[2])+x+str(list5[3])+')'+')')
except ZeroDivisionError:
m9=0
try:
m10=eval(str(list5[0])+i+str(list5[1])+j+str(list5[2])+x+str(list5[3]))
except ZeroDivisionError:
m10=0
list7=[m0,m1,m2,m3,m4,m5,m6,m7,m8,m9,m10]
if int(24) in list7:
flag=True
if flag:
print('true')
else:
print('false')
except:
break