a = []
x = 23
while x != 0:
x = int(input())
a.append(x)
a.pop()
mul = 1
for i in a:
if i % 2 == 0:
mul *= i
print(mul)
a = []
x = 23
while x != 0:
x = int(input())
a.append(x)
a.pop()
mul = 1
for i in a:
if i % 2 == 0:
mul *= i
print(mul)