x = eval(input())

a, b = tuple(x.split())

a = int(a)

b = int(b)

print((a * b, 2 * a + 2 * b))
x, y = input().split()

x, y = int(x), int(y)

print((x * y, 2 * (x + y)))
x = eval(input())
a, b = tuple(x.split())
a = int(a)
b = int(b)
print((a * b, 2 * a + 2 * b))

x, y = input().split()
x, y = int(x), int(y)
print((x * y, 2 * (x + y)))

-x = eval(input()) -a, b = tuple(x.split()) -a = int(a) -b = int(b) -print((a * b, 2 * a + 2 * b)) +x, y = input().split() +x, y = int(x), int(y) +print((x * y, 2 * (x + y)))