import sys
def isok(lst,n):
if len(lst) == 1:
return round(lst[0],5) == round(n,5) or -round(lst[0],5) == round(n,5)
else:
if round(n,5) == 0:
return False
for i in range(len(lst)):
m = lst[0:i] + lst[i+1:]
x = lst[i]
if isok(m,n+x) or isok(m,n/x) or isok(m,n*x) or isok(m,n-x) or isok(m,x-n) or isok(m,x/n):
return True
if len(lst) == 4:
for i in range(3):
for j in range(i+1,4):
a = lst[i]
b = lst[j]
k,l = {0,1,2,3}-{i,j}
c = lst[k]
d = lst[l]
if abs((a+b)*(c+d)) == 24 or abs((a-b)*(c+d)) == 24 or abs((a+b)*(c-d)) == 24 or abs((a-b)*(c-d)) == 24:
return True
return False
while True:
try:
lst = list(map(int,input().split()))
if isok(lst,24):
print('true')
else:
print('false')
except:
break