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

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

print(a*b, end=" ")
print(2*(a+b))