x = input().split()

a = int(x[0])*int(x[1])

b = 2*(int(x[1])+int(x[0]))



print((a,b))
s = input().rstrip().split(' ')

s1=int(s[0])

s2=int(s[1])

print((s1*s2, 2*s1+2*s2))
x = input().split()
a = int(x[0]) * int(x[1])
b = 2 * (int(x[1]) + int(x[0]))
print((a, b))

s = input().rstrip().split(" ")
s1 = int(s[0])
s2 = int(s[1])
print((s1 * s2, 2 * s1 + 2 * s2))

-x = input().split() -a = int(x[0]) * int(x[1]) -b = 2 * (int(x[1]) + int(x[0])) -print((a, b)) +s = input().rstrip().split(" ") +s1 = int(s[0]) +s2 = int(s[1]) +print((s1 * s2, 2 * s1 + 2 * s2))