import sys
inlist=[list(map(int,len.strip().split(" "))) for len in sys.stdin]
def getpossibleaction(a,b):
possibleaction=[]
possibleaction.append(a+b)
possibleaction.append(a*b)
possibleaction.append(a/b)
possibleaction.append(a-b)
return possibleaction
def getpossible24(s):
for a in range(4):
first=copy.copy(s)
x1=first.pop(a)
for b in range(3):
second=copy.copy(first)
x2=second.pop(b)
possibles=getpossibleaction(x1, x2)
for r1 in possibles:
for c in range(2):
third=copy.copy(second)
x3=third.pop(c)
possibles2=getpossibleaction(r1, x3)
for r2 in possibles2:
for d in range(1):
fourth=copy.copy(third)
x4=fourth.pop(d)
possibles3=getpossibleaction(r2, x4)
if 24 in possibles3:
print('true')
return
print('false')
return
for s in inlist:
getpossible24(s)