width, length = [int(x) for x in input().split(" ")]

print(("{} {}".format(width * length, 2 * (width+length))))
a, b = list(map(int, input().split()))

print(("{} {}".format(a*b, (a+b)* 2)))

width, length = [int(x) for x in input().split(" ")]
print(("{} {}".format(width * length, 2 * (width + length))))

a, b = list(map(int, input().split()))
print(("{} {}".format(a * b, (a + b) * 2)))

-width, length = [int(x) for x in input().split(" ")] -print(("{} {}".format(width * length, 2 * (width + length)))) +a, b = list(map(int, input().split())) +print(("{} {}".format(a * b, (a + b) * 2)))