def dfs(lst):
    if len(lst) == 1:
        if lst[0] == 24:
            return True
        else:
            return False
    a = dfs([ lst[0] + lst[1] ] + lst[2:]) # +
    b = dfs([ lst[0] - lst[1] ] + lst[2:]) # -
    c = dfs([ lst[0] * lst[1] ] + lst[2:]) # *
    d = dfs([ lst[0] / lst[1] ] + lst[2:]) # /
    return a or b or c or d

def others(lst, idx):
    res = []
    for i in range(len(lst)):
        if i != idx:
            res.append(lst[i])
    return res

def groups(lst):
    res = []
    for idx, i in enumerate(lst):
        lst1 = others(lst, idx)
        for idy, j in enumerate(lst1):
            lst2 = others(lst1, idy)
            l1, l2 = [i, j] + lst2, [i, j] + lst2[::-1]
            if l1 not in res:
                res.append(l1)
            if l2 not in res:
                res.append(l2)
    return res

while True:
    try:
        nums = list(map(int, input().split()))
        
        def judge(lst):
            for g in groups(lst):
                if dfs(g):
                    return True
            return False

        if judge(nums):
            print('true')
        else:
            print('false')

    except:
        break