import itertools def dfs(nums): try: n = len(nums) if n==1 and nums[0]==24: return True else: for x, y in itertools.permutations(nums, 2): nums.remove(x) nums.remove(y) if dfs(nums+[x+y]): return True if dfs(nums+[x-y]): return True if dfs(nums+[x*y]): return True if dfs(nums+[x/y]): return True nums.append(x) nums.append(y) return False except: pass nums = list(map(int, input().split())) if dfs(nums): print('true') else: print('false')