l=input().split()

w=l[0]

h=l[1]

w=int(w)

h=int(h)

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

print((a*b,(a+b)*2))
l = input().split()
w = l[0]
h = l[1]
w = int(w)
h = int(h)
print((w * h, 2 * w + 2 * h))

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

-l = input().split() -w = l[0] -h = l[1] -w = int(w) -h = int(h) -print((w * h, 2 * w + 2 * h)) +a, b = list(map(int, input().split())) +print((a * b, (a + b) * 2))