first_number = int(input())
second_number = int(input())
third_number = int(input())
multiply = first_number * second_number * third_number
numbers_list = []
for n in multiply:
n = int(n)
numbers_list.append(n)
if numbers_list[-1] == 4:
print('True')
elif numbers_list[-1] != 4:
print('False')
first_number = int(input())
second_number = int(input())
third_number = int(input())
multiply = first_number * second_number * third_number
numbers_list = []
for n in multiply:
n = int(n)
numbers_list.append(n)
if numbers_list[-1] == 4:
print('True')
elif numbers_list[-1] != 4:
print('False')