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

area, perimeter =rect(a,b)
print(area, perimeter)

def rect(a,b):
    return a*b, 2*(a+b)
n = input()
s = n.split()
a = int(s[0])
b = int(s[1])
area, perimeter = rect(a,b)
print(area,perimeter)
