Write a program which calculates the area and perimeter of a given rectangle.
a, b = [int(n) for n in input().split()]
print("{} {}".format(pow(a+b, 2), 2*(a+b)))
a, b = [int(n) for n in input().split()]
print("{} {}".format(a*b, (a+b)*2))