a,b=list(map(int,input().split()))

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

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

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

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