#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
using namespace std;
double cacul(double a, double b, char op) {
switch(op) {
case '+': return a + b;
case '-': return a - b;
case '*': return a * b;
case '/': return a / b;
}
return 0;
}
int main() {
double num;
vector<double> nums;
while (cin >> num) {
nums.push_back(num);
}
sort(nums.begin(), nums.end());
string oper = "+-*/";
do {
for (char op1 : oper) {
for (char op2 : oper) {
for (char op3 : oper) {
double first = cacul(nums[0], nums[1], op1);
double second = cacul(first, nums[2], op2);
double third = cacul(second, nums[3], op3);
if (third == 24) {
cout << "true" << endl;
return 0;
}
}
}
}
}while (next_permutation(nums.begin(), nums.end()));
cout << "false" << endl;
return 0;
}