Write a program which calculates the area and perimeter of a given rectangle.
x, y = [int(i) for i in input().split()]
print((x + y) * 2)
x, y = [int(i) for i in input().split()]

s = x * y
l = (x + y) * 2
print(str(s)+" "+ str(l))