Write a program which calculates the area and perimeter of a given rectangle.
x = input()
x = x.split()
a = int(x[0])
b = int(x[1])
print(a*2,b*2)

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