t = input().split()

a = int(t[0])

b = int(t[1])

s = 2 * (a + b)

l = a * b

print((str(l) + " " + str(s)))
a,b = list(map(int, input().split()))

c = 2 * (a+ b)

d = a * b

print((str(d) + " " + str(c)))
t = input().split()
a = int(t[0])
b = int(t[1])
s = 2 * (a + b)
l = a * b
print((str(l) + " " + str(s)))

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

-t = input().split() -a = int(t[0]) -b = int(t[1]) -s = 2 * (a + b) -l = a * b -print((str(l) + " " + str(s))) +a, b = list(map(int, input().split())) +c = 2 * (a + b) +d = a * b +print((str(d) + " " + str(c)))