Problem:
Rectangle Write a program which calculates the area and perimeter of a given rectangle. Input The length a and breadth b of the rectangle are given in a line separated by a single space. Output Print the area and perimeter of the rectangle in a line. The two integers should be separated by a single space. Constraints  1 ≤ a , b ≤ 100  Sample Input 1 3 5 Sample Output 1 15 16

Solution (Python):
a, b = map(int, input(). split())
print (a*b, 2*(a+b))

Solution (Python):
a,b=map(int,input().split())
print(a*b,2*(a+b))

Solution (Python):
a, b=map(int, input().split())
print(a*b, 2*(a+b))

Solution (Python):
a, b = map(int, input().split())
print(a*b, 2*(a+b))

Solution (Python):
z= input()
x, y = z.split()

m = int(x)*int(y)
l = int(x)*2+int(y)*2
print('{} {}'.format(m,l))

Solution (Python):
(a,b) = list(map(int, input().split()))
print ("%d %d" % (a * b, a * 2 + b * 2))

Solution (Python):


a,b = input().split()
m = int(a) * 2 + int(b) * 2
s = int(a) * int(b)
print(s,m)

Solution (Python):
a, b = map(int, input().split())
print(a*b, a*2 + b*2)

Solution (Python):


a, b = map(int, input().split())

space = a*b
long = 2*(a+b)

print(space,long)

Solution (Python):
a, b = map(int, input().split())

print(a * b , 2 *(a + b))

Solution (Python):
w, h = [int(x) for x in raw_input().split(" ")]
print "{0} {1}".format(w * h, w * 2 + h * 2)

Solution (Python):
height, width = [int(x) for x in input().split(" ")]
print (height * width, height * 2 + width * 2)

Solution (Python):
a,b=map(int,input().split())
print (a*b,2*(a+b))

Solution (Python):
line = list(map(int,input().split()))
print(line[0]*line[1],line[0]*2+line[1]*2)

Solution (Python):
a = input().split()
print((int(a[0]) * int(a[1])), ((int(a[0]) + int(a[1])) * 2))

Solution (Python):
a, b = [int(n) for n in input().split()]
print("{} {}".format(a*b, (a+b)*2))

Solution (Python):
x, y = input().split()

a = int(x) * int(y)
b = int(x)*2 + int(y)*2
print("{} {}".format(a, b))

Solution (Python):

a,b=map(int,input().split())
print(str(a*b)+" "+str(2*(a+b)))

Solution (Python):
num = input()
data = []
data = num.split()
sqr=int(data[0])*int(data[1])
rou = int(data[0])*2+int(data[1])*2
print(str(sqr)+' '+str(rou))

Solution (Python):
a, b = map(int, raw_input().split())
print a*b, a*2+b*2

Solution (Python):
if __name__ == "__main__":
	num1, num2 = map( int, input().split() )
	print(num1*num2,(num1+num2)*2)

Solution (Python):
x = input()
y = x.split(" ")
print("%d %d" % (int(y[0])*int(y[1]), int(y[0])*2 + int(y[1])*2))

Solution (Python):
(lambda l:print("{0} {1}".format(l[0]*l[1],2*(l[0]+l[1]))))([int(e)for e in input().split()])

Solution (Python):
import sys
 
lines = [x.strip().split() for x in sys.stdin.readlines()][0]
[a, b] = [int(x) for x in lines]
 
print a*b, 2*(a+b)

Solution (Python):
l = [int(x) for x in input().split(' ')]
print(l[0] * l[1], 2 * (l[0] + l[1]))

Solution (Python):
a, b = map(int, raw_input().split(' '))
print str(a*b) + ' ' + str(a*2 + b*2)

Solution (Python):
a, b = map(int, raw_input().split())
print a*b, 2*(a+b)

Solution (Python):
num_list=list(map(int,input().split()))
print(num_list[0]* num_list[1], 2*(num_list[0]+num_list[1]))

Solution (Python):
a, b = map(int, input().split())
print(a*b, a*2 + b*2)

Solution (Python):
data = input().split()
a = int(data[0])
b = int(data[1])
print(str(a*b) + " " + str(a*2+b*2))

Solution (Python):
a, b =map(int,input().split())

print(a*b , 2*a+2*b)

Solution (Python):
values = input()
height, width = [int(x) for x in values.split()]
print(height * width,  height * 2 + width * 2)

Solution (Python):
a, b = map(int, input().split())
print(a*b, 2*a+2*b)

Solution (Python):
l = map(int,raw_input().split())

print(str(l[0]*l[1])+" "+str((l[0]+l[1])*2))

Solution (Python):
if __name__ == '__main__':
    key_in = input()
    data = key_in.split(' ')

    height = int(data[0])
    width = int(data[1])
    area = height * width
    perimeter = 2 * height + 2 * width
    print('{0} {1}'.format(area, perimeter))

Solution (Python):
a, b = map(int, input().split())
print("%d %d" % (a * b, (a + b) * 2))

Solution (Python):
a, b = map (int, input().split())
print(a*b, a*2 + b*2)

Solution (Python):
a,b=map(int,input().split());
print(str(a*b)+" "+str((a+b)*2));

Solution (Python):
s = raw_input()
list = s.split()
print str(int(list[0]) * int(list[1])) + " " + str(2 * int(list[0]) + 2 * int(list[1]))

Solution (Python):
a, b = map(int, input().split())
print(" ".join(map(str ,[a*b, 2*(a+b)])))

Solution (Python):
list = input().split(' ')

x = int(list[0])

y = int(list[1])

x1 = x * y
y1 = (x + y) * 2

print(str(x1) + ' ' + str(y1))

Solution (Python):
n = raw_input()
a = n.split(" ")
b = int(a[0])
c = int(a[1])
print str(b*c)+" "+str((b+c)*2)

Solution (Python):
a, b = map(int, input().split())

if (a >= 1) or (b <= 100):
    num = str(a * b)
    length = str((a * 2) + (b * 2))
    print(num + " " + length, end="\n")
else:
    pass

Solution (Python):
x,y = [int(i) for i in input().split()]
print(x*y,(x+y)*2)

Solution (Python):
a,b = list(map(int, input().split()))
c = 2 * (a+ b)
d = a * b

print(str(d) + " " + str(c))

Solution (Python):
c=input()
a,b=c.split()
x=int(a)*int(b)
y=(int(a)+int(b))*2
print('{} {}'.format(x,y))

Solution (Python):


a,b = list(map(int, input().split()))

print(str(a * b) + " " + str(2 * (a + b)))

Solution (Python):
str = raw_input()
a = str.split(' ')

n1 = int(a[0])
n2 = int(a[1])

print n1 * n2, (n1 + n2) * 2

Solution (Python):
a, b = map(int, input().split())
print(a * b, (a * 2) + (b * 2))

Solution (Python):
a = input().split()
S = int(a[0]) * int(a[1])
D = (int(a[0]) + int(a[1]))*2
print(S,D)

Solution (Python):
l = 0
l = input().split()
men = 0
syu = 0
unko = int(l[0])
tinko = int(l[1])
men = unko*tinko
syu = unko*2+tinko*2
print(men,syu)

Solution (Python):
lis=0
S=0
L=0
lis=input().split()
S=int(lis[0])*int(lis[1])
L=int(lis[0])*2+int(lis[1])*2
print(S,L)

Solution (Python):
a,b = map(int, input().split())
print(a*b, (a+b)*2)

Solution (Python):
x, y = [int(i) for i in input().split()]
print(x*y, 2*(x+y))

Solution (Python):
data = input().split()
w = int(data[0])
h = int(data[1])

area = w * h
length = (w + h) * 2

print('%d %d' % (area, length))

Solution (Python):
data = raw_input()
dlist = data.split(' ')
a = int(dlist[0])
b = int(dlist[1])

print(str(a*b) + ' ' + str((a+b)*2))

Solution (Python):
data = raw_input()
dlist = data.split(' ')
a = int(dlist[0])
b = int(dlist[1])

print(str(a*b) + ' ' + str((a+b)*2))

Solution (Python):
[a,b] = list(map(int,input().split()))
print(a*b,(a+b)*2)

Solution (Python):
a,b=map(int,raw_input().split())
print a*b,(a+b)*2

Solution (Python):

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

Solution (Python):
a, b = map(int, input().split())

if (a >= 1) or (b <= 100):
    num = str(a * b)
    length = str((a * 2) + (b * 2))
    print(num + " " + length, end="\n")
else:
    pass

Solution (Python):


x = input()
k = x.split(' ')
a = int(k[0])
b = int(k[1])

area = int(a) * int(b)
length = int(a)*2 + int(b)*2

print(area,length)

Solution (Python):
a = input().split()
b = int(a[1])
a = int(a[0])

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

Solution (Python):
a, b = map(int, raw_input().split())
print a*b, (a+b)*2

Solution (Python):
(a, b) = map(int, input().split())
print(a*b, end=' ')
print(2*(a+b))

Solution (Python):
x, y = input().split()
print(int(x)*int(y), (int(x)+int(y))*2)

Solution (Python):
a,b = map(int, input().split())
print (a*b, 2*(a+b))

Solution (Python):
a,b = map(int,raw_input().split())
s = a * b
shu = a * 2 + b * 2
fmt = "{s} {shu}"
s = fmt.format(s = s,shu = shu)
print(s)

Solution (Python):
a,b = (input().split())
a = int(a)
b = int(b)
s = a * b
shu = a * 2 + b * 2
fmt = "{s} {shu}"
s = fmt.format(s = s,shu = shu)
print(s)

Solution (Python):
a,b = list(map(int, input().split()))

s = a * b
shu = a * 2 + b * 2
fmt = "{s} {shu}"
s = fmt.format(s = s,shu = shu)
print(s)

Solution (Python):
s = input().rstrip().split()
a = int(s[0])
b = int(s[1])
print(str(a * b) + " " + str(2 * (a + b)))

Solution (Python):
a,b=map(int,input().split())
print(a*b,2*(a+b))

Solution (Python):
a,b = raw_input().split(" ")
a = int(a)
b = int(b)
print str(a*b) + " " + str(2*a + 2*b)

Solution (Python):
data=list(map(int, input().split(' ')))
n=m=0
for v in data:
    n = v if n==0 else n*v
    m += 2*v
print(n,m)

Solution (Python):
def calc():
    w, h = list(map(int, input().split()))
    
    print(w * h, (w * 2) + (h * 2))
    
calc()

Solution (Python):
a, b = [int(i) for i in input().split()]
c = a * b
d = 2 * (a + b)
print('{c} {d}'.format(**locals()))

Solution (Python):
import fileinput

for line in fileinput.input():
    tokens = list(map(int, line.strip().split()))
    a, b = tokens[0], tokens[1]
    print(a*b, 2*(a+b))

Solution (Python):
data = map(int,raw_input().split())

area = data[0] * data[1]
circumference = 2 * (data[0] + data[1])
print area, circumference

Solution (Python):
data = input().split()
a = int(data[0])
b = int(data[1])

print(a * b, 2 * a + 2 * b)

Solution (Python):
a, b = [int(i) for i in input().split()]
print(str(a*b) + ' ' + str((a+b) * 2))

Solution (Python):
invalue = input().split(' ')
a = int(invalue[0])
b = int(invalue[1])
area = a * b
perimeter = 2*a + 2*b
print(str(area), str(perimeter))

Solution (Python):


def area_circumference():
    a, b = [int(i) for i in input().split()]
    return a, b

def main():
    a, b = area_circumference()
    print(str(a*b) + ' ' + str((a+b) * 2))

if __name__ == '__main__':
    main()

Solution (Python):
a,b = map(int ,raw_input().split())

print a*b,a*2+b*2

Solution (Python):


def string_two_numbers_spliter():
    a, b = [int(i) for i in input().split()]
    return a, b


def main():
    a, b = string_two_numbers_spliter()
    print(str(a*b) + ' ' + str((a+b) * 2))


if __name__ == '__main__':
    main()

Solution (Python):
a,b=map(int,input().split())
print(a*b,a*2+b*2)

Solution (Python):
a,b= map(int,input().split())
print(a*b,2*a+2*b)

Solution (Python):
l=raw_input().split(" ")
a,b=int(l[0]),int(l[1])
print str(a*b)+" "+str(2*a+2*b)

Solution (Python):
a = input().split()
area = int(a[0]) * int(a[1])
length = int(a[0]) * 2 + int(a[1]) * 2
print(area, length)

Solution (Python):
def area(ls):
    return ls[0] * ls[1]

def per(ls):
    return (2 * ls[0]) + (2 * ls[1])


if __name__ == '__main__':
    data = list(map(int, input().split()))
    s = area(data)
    l = per(data)
    print(s, l)

Solution (Python):
input_data = input().split()
a = int(input_data[0])
b = int(input_data[1])
area = a * b
circumference = (a * 2) + (b * 2)
print(str(area) + " " + str(circumference))

Solution (Python):
z = input()
a,b = z.split()


print(int(a)*int(b) ,2*(int(a)+int(b)))

Solution (Python):
input_str = input()

split_list = input_str.split()

print(int(split_list[0]) * int(split_list[1]), int(split_list[0]) * 2 + int(split_list[1]) * 2)

Solution (Python):
a, b = map(int,input().split())
M = a * b
S = 2 * (a + b)
print(M,S)

Solution (Python):
data = input().split()
a = data[0]
b = data[1]
print (int(a) * int(b), 2 * (int(a) + int(b)))

Solution (Python):
t,y=map(int,input().split())
print (t*y, 2*(t+y))

Solution (Python):
t,y=map(int,raw_input().split())
print t*y, 2*(t+y)

Solution (Python):
a,b=map(int,input().split())
print(a*b,2*(a+b))

Solution (Python):
a, b = list(map(int, input().split()))
print(a * b, a * 2 + b * 2)

Solution (Python):



import sys

def init():
    data = []
    try:
        while(True):
            line = raw_input()
            if not line: break
            data.append(tuple(line.split(" ")))
    except EOFError:
        pass
    return data

def valid(n):
    return (1 <= n <= 100)

def main():
    hight, width = init().pop()
    hight = int(hight)
    width = int(width)
    if valid(hight) and valid(width):
        print "%d %d" % (hight*width, hight*2+width*2)
    else:
        print "Error / Invalid input (%d,%d)" % (hight, width)

if __name__ == '__main__':
    main()

Solution (Python):
y,z = map(int,input().split())
print((y*z),((y+z)*2),sep=' ')

Solution (Python):
a, b = map(int, input().rstrip().split(" "))

print(a*b, 2*(a+b))

Solution (Python):
l = input().split()
print(int(l[0])*int(l[1]),2*int(l[0])+2*int(l[1]))

Solution (Python):
l = input().split()
print(int(l[0])*int(l[1]),2*int(l[0])+2*int(l[1]))

Solution (Python):
l = input().split()
print(int(l[0])*int(l[1]),2*int(l[0])+2*int(l[1]))

Solution (Python):
a, b = map(int, input().split())

S = a * b
L = 2 * (a + b)
print(S, L)

Solution (Python):
A, B = list(map(int, input().split()))
print(A*B, A*2 + B*2)

Solution (Python):
inp=input().split()
ab=[int(inp[0]),int(inp[1])]
print(ab[0]*ab[1],ab[0]*2+ab[1]*2)

Solution (Python):
a, b =list(map(int, input().split()))
print (a*b, 2*(a+b))

Solution (Python):
if __name__ == "__main__":
    a,b = map(int,input().split())
    equivalent = a*b
    lap = 2*a + 2*b
    print(str(equivalent) + " " + str(lap))

Solution (Python):
width, length = [int(x) for x in input().split(" ")]
print("{} {}".format(width * length, 2 * (width+length)))

Solution (Python):
input = input().split(' ')
a = int(input[0])
b = int(input[1])
x = a * b
y = (a + b) * 2
print("{} {}".format(x, y))

Solution (Python):
input = list(map(lambda n: int(n), input().split(' ')))
a = int(input[0])
b = int(input[1])
x = a * b
y = (a + b) * 2
print("{} {}".format(x, y))

Solution (Python):
input = list(map(lambda n: int(n), input().split(' ')))
a = input[0]
b = input[1]
x = a * b
y = (a + b) * 2
print("{} {}".format(x, y))

Solution (Python):
input = list(map(lambda n: int(n), input().split(' ')))
x = input[0] * input[1]
y = (input[0] + input[1]) * 2
print("{} {}".format(x, y))

Solution (Python):
input = list(map(lambda n: int(n), input().split(' ')))
print("{} {}".format(input[0] * input[1], (input[0] + input[1]) * 2))

Solution (Python):
s = raw_input().rstrip().split(" ")
a = int(s[0])
b = int(s[1])
print a*b,a*2+b*2

Solution (Python):
a, b = [int(i) for i in input().split()]
print(a * b, (a + b) * 2)

Solution (Python):
a=input().split()
area=int(a[0])*int(a[1])
length=(int(a[0])+int(a[1]))*2
print(str(area) + " " + str(length))

Solution (Python):
x = list(map(int,input().split(" ")))
print("{} {}".format(x[0]*x[1],2*(x[0]+x[1])))

Solution (Python):
a, b = map(int, input().split())
print(a*b, a*2 + b*2)

Solution (Python):
a, b = [int(temp) for temp in input().split()]
print(a * b, (a + b) * 2)

Solution (Python):

a, b = map(int, input().split())

area = a*b
length = 2*a + 2*b

print (area, length)

Solution (Python):
a, b = input().split()
a, b = int(a), int(b)
area = a*b
length =a*2 + b*2
print(area, length)

Solution (Python):
a, b = tuple(input().split())
a = int(a)
b = int(b)
print(a * b, 2 * (a + b))

Solution (Python):
x = list(map(int, input().split()))
print(x[0]*x[1], 2*(x[0]+x[1]))

Solution (Python):
a,b = (int(i) for i in input().split())
print(str(a*b)+" "+str(a*2+b*2))

Solution (Python):
a,b = input().split()
area = int(a) * int(b)
perimeter = 2 * (int(a) + int(b))
print(area, perimeter)

Solution (Python):
b, c = map(int, raw_input().split())
print str(b*c) + " " + str((b+c)*2)

Solution (Python):
strs = input().split()
a = int(strs[0])
b = int(strs[1])
print(str(a*b)+" "+str(a*2+b*2))

Solution (Python):
inp = input().split()
if len(inp) >= 2:
    a = int(inp[0])
    b = int(inp[1])
    print("{} {}".format(a * b, (a + b) * 2))
else:
    print("Input illegal.")

Solution (Python):
a,b = map(int,input().split(' '))
print(str(a * b) + ' ' + str((a*2) + (b * 2)))

Solution (Python):
nums = list(map(int, input().split()))
print(nums[0] * nums[1], (nums[0] + nums[1]) * 2)

Solution (Python):
a, b = map(int, input().split(' '))
print('{} {}'.format(a*b, 2*(a+b)))

Solution (Python):
a, b = map(int, input().split())
print(a*b, 2*(a+b))

Solution (Python):
s = input().rstrip().split(' ')
a = int(s[0])
b = int(s[1])
S = a * b
L = 2 * (a + b)
print(str(S) + " " + str(L))

Solution (Python):
a,b = (int(i) for i in input().split())
print(a*b,end = " ")
print(a*2+b*2)

Solution (Python):


line = input().split(" ")
a = int(line[0])
b = int(line[1])
menseki = a * b
nagasa = a + a + b + b
print(menseki , nagasa)

Solution (Python):
x,y = [int(i) for i in input().split()]
area = x*y
length = (x*2)+(y*2)
print(area,length)

Solution (Python):
a, b = map(int, input().split())
print(a*b, 2*(a + b))

Solution (Python):


import sys

if __name__ == '__main__':
	in_str = sys.stdin.readline()
	_a, _b = in_str.split(' ')
	a = int(_a )
	b = int(_b )
	area = a*b
	roun = a*2+b*2
	print('{} {}'.format( area, roun ))

Solution (Python):
a, b = map(int, input().split(" "))
area = a*b
perimeter = 2*(a+b)
print(area, perimeter)

Solution (Python):
x, y = map(int, input().split())
print(x * y, 2 * (x + y))

Solution (Python):


import sys
import os
import pprint




a, b = list(map(int, input().split()))
s = a * b
l = 2 * a + 2 * b
print(s, l)

Solution (Python):
a,b = map(int,input().split())
c = a * b
d = 2 * (a + b)
print('{} {}'.format(c,d))

Solution (Python):
a,b = map(int,input().split())
S = a*b
L = 2*(a+b)
print(S,end=" ")
print(L)

Solution (Python):


list = input().rstrip().split(" ")

area = int(list[0])*int(list[1])
length = int(list[0])*2 + int(list[1])*2

print(str(area) + " " + str(length))

Solution (Python):
a,b=map(int,input().split())
print(a*b,(a+b)*2)

Solution (Python):
[h,w] = map(int, raw_input().split())
print h*w, h*2+w*2

Solution (Python):
s = input().split()
a=int(s[0])
b=int(s[1])
print(a*b,a*2+b*2)

Solution (Python):
a, b = list(map(int, input().split()))
print(a*b, 2*a + 2*b)

Solution (Python):
x, y = map(int,input().split(" "))
print(x*y, 2*(x+y))

Solution (Python):
a,b=[int(i) for i in input().split()]
print("{} {}".format(a*b,2*(a+b)))

Solution (Python):
a,b=[int(i) for i in input().split()]
print("{0} {1}".format(a*b, (a+b)*2))

Solution (Python):
a, b = map(int, input().split())

print(a * b, a * 2 + b * 2)

Solution (Python):
a, b = map(int, input().split())
print(str(a * b) + " " + str(2 * (a + b)))

Solution (Python):
ab=input().split(" ")
a=int(ab[0])
b=int(ab[1])

print(str(a*b)+" "+str(2*(a+b)))

Solution (Python):
x = map(int,raw_input().split())
z=x[0]*x[1]
a=(x[0]+x[1])*2
print z,a

Solution (Python):
a, b = map(int, input().split())
print(a*b,2*(a+b))

Solution (Python):
a=input()
b,c =a.split()
print(int(b)*int(c),end=" ")
print(int(b)*2+int(c)*2)

Solution (Python):
a,b = list(map(int,input().split()))

area = a*b
length = 2 * (a+b)

print(area,end=" ")
print(length)

Solution (Python):
a=input().split()
b=int(a[0])*int(a[1])
c=(int(a[0])+int(a[1]))*2
print(b,end="")
print(" ",end="")
print(c)

Solution (Python):
inp = input()
val = inp.split(" ")
b = int(val[1])
a = int(val[0])
print(a*b, a+a+b+b)

Solution (Python):
x = list(map(int, input().split()))
y = x[0] * x[1]
z = 2 * (x[0] + x[1]) 
print(y, z)

Solution (Python):
a,b=map(int,input().split())
print(a*b , a*2+b*2)

Solution (Python):
a, b = map(int, input().split())

s = a * b
l = 2*a + 2*b

print(str(s) + ' ' + str(l))

Solution (Python):
l = [int(x) for x in input().split()]
print(l[0]*l[1],2*(l[0]+l[1]))

Solution (Python):
s=input().split()
a=int(s[0])
b=int(s[1])
x=a*b
y=2*(a+b)
print(x,y)

Solution (Python):
a,b=input().split()
a=int(a)
b=int(b)
print(a*b,2*a+2*b)

Solution (Python):
a,b = map(int, input().split())
print(str(a*b) + ' ' + str((a+b) * 2))

Solution (Python):
a,b = map(int,input().split())

print(a*b, a*2+b*2)

Solution (Python):
x, y = [int(i) for i in input().split()]

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

Solution (Python):
a, b = list(map(int, input().split()))
print(a * b, 2*(a + b))

Solution (Python):



def func():
    try:
        line=input().rstrip()
        list=line.split(" ")
        a=int(list[0])
        b=int(list[1])
    except:
        print("input error")
        return -1
    
    print(str(a*b)+" "+str(a*2+b*2))

func()

Solution (Python):

s = input().split()
cir = 2*(int(s[0])+int(s[1]))
area = int(s[0])*int(s[1])
print (area,cir)

Solution (Python):
a,b = map(int,input().split())
print(a*b, 2*(a+b))

Solution (Python):
a,b = map(int, input().split())

print(a*b,2*(a+b))

Solution (Python):

a, b = map(int, input().split())
print(a*b, a*2 + b*2)

Solution (Python):
b, h= input().split()
b = int(b)
h = int(h)

p=2*h+2*b
a=h*b

print(str(a)+" "+str(p))

Solution (Python):
a,b = map(int, input().split())
print(a*b, 2*(a+b))

Solution (Python):
data = input().split()

a = int(data[0],10) * int(data[1],10)
p = 2 * (int(data[0],10) + int(data[1],10))

print(a, p)

Solution (Python):
x=map(int,(raw_input().split()))
print x[0]*x[1],2*(x[0]+x[1])

Solution (Python):
import math


a,b = (int(i) for i in input().split())

a = int(a)
b = int(b)
print (a * b,a*2 + b*2)

Solution (Python):
nums = input().split(" ")
a =int( nums[0])
b = int(nums[1])

print(a*b, (a+b)*2)

Solution (Python):
a,b = map(int,input().split())
print(a * b, a*2 + b*2)

Solution (Python):
a,b = map(int,input().split())
print(a * b, a*2 + b*2)

Solution (Python):
a,b = map(int,raw_input().split())

print('{0} {1}'.format(a*b,2*(a+b)))

Solution (Python):
a,b=map(int,input().split())
m=a*b
s=(a+b)*2
print(m,s)

Solution (Python):
def main(arg):
    numbers = [int(x) for x in arg.split(" ")]
    s = numbers[0] * numbers[1]
    p = (numbers[0] + numbers[1]) * 2
    result = "{} {}".format(s,p)
    return result


if __name__ == '__main__':
    print(main(input()))

Solution (Python):
a,b=map(int, input().split())
print(a*b, a+a+b+b)

Solution (Python):
a, b = map(int, input().split(' '))

s = a*b
c = a*2 + b*2

print(s, c)

Solution (Python):
x = input()
x = x.split()
x[0] = int(x[0])
x[1] = int(x[1])
print(str(x[0]*x[1]),str(x[0]*2+x[1]*2))

Solution (Python):


a , b =input().split(" ")
a = int(a)
b = int(b)
print(str(a*b) +" "+str(2*(a+b)))

Solution (Python):
x,y = map(int,input().split())
print(x*y,x*2+y*2)

Solution (Python):
a, b = map(int, raw_input().split())
print a * b, 2 * (a + b)

Solution (Python):
input = raw_input().split();
rec = map(int, input)
print(str(rec[0]*rec[1]) +" "+ str((rec[0]+rec[1])*2))

Solution (Python):
a,b = map(int, input().split())
S = a * b
L = 2 * (a + b)
print(str(S) + " " + str(L))

Solution (Python):





x, y = map(int, input().split())
s = x * y
l = 2 * (x + y)
print(' '.join([str(s), str(l)]))
pass

Solution (Python):
a=input().split(" ")
print(int(a[0])*int(a[1]),2*int(a[0])+2*int(a[1]))

Solution (Python):
width, height = map(int, (input()).split(" "))
print("{0} {1}".format(width * height, width * 2 + height * 2))

Solution (Python):
s = input().split(" ")
s = list(map(int, s))
leng = (s[0] + s[1]) * 2
cm2 = s[0] * s[1] 
print(cm2, leng)

Solution (Python):
import sys

a,b = map(int, sys.stdin.readline().rstrip().split(' '))
print("{} {}".format(a*b,(a+b)*2))

Solution (Python):
a, b = map(int, input().split())
print(a*b, (a+b)*2)

Solution (Python):
a, b = map(int, input().split())
print(a*b, a*2+b*2)

Solution (Python):
a,b=map(int, input().split())
print(a*b, 2*(a+b))

Solution (Python):
a, b = input().split()
a = int(a)
b = int(b)
print(a*b, a*2 + b*2)

Solution (Python):
num = input("").split(" ")
print(int(num[0])*int(num[1]),int(num[0])*2+int(num[1])*2)

Solution (Python):
inpt = input()
a, b = [int(x) for x in inpt.split()]
area = a*b
length = a*2 + b*2
print(area, length)

Solution (Python):


a = map(int, raw_input().split())

S = a[0] * a[1]
l = 2 * a[0] + 2 * a[1]
print str(S)+" "+str(l)

Solution (Python):
l = raw_input().split()
print int(l[0])*int(l[1]), 2*int(l[0])+2*int(l[1])

Solution (Python):
list = input().split()
x = int(list[0])
y = int(list[1])
print(x*y, x*2+y*2)

Solution (Python):
a, b = [int(i) for i in input().split()]
area = a * b
perimeter = 2 * (a + b)
print(area, perimeter, sep=" ")

Solution (Python):
a,b=map(int,raw_input().split())
if 0<=b<=100 and 0<=b<=100:
    print a*b,
    print a*2+b*2
else:
    pass

Solution (Python):
a,b = [int(i) for i in input().split()]
print(" ".join([str(a*b),str(2*(a+b))]))

Solution (Python):
a, b = map(int, input().split())
print(a*b, 2*(a+b))

Solution (Python):
a, b = input().split()
a = int(a)
b = int(b)
print((a * b), (a * 2 + b * 2))

Solution (Python):

l = input().strip().split()
sq = int(l[0])*int(l[1])
ar = (int(l[0]) + int(l[1])) * 2
print("{0} {1}".format(sq, ar))

Solution (Python):


x,y = (int(i) for i in input().split())

print(str(x * y) + " " + str(x * 2 + y * 2))

Solution (Python):
a,b = map(int,input().split())
c = a + b
print(int(a) * int(b),c * 2)

Solution (Python):
a,b = map(int,input().split())
x = a * b
y = 2 * a + 2 * b
print('{} {}'.format(x,y))

Solution (Python):
a,b=map(int,input().split(" "))
c=a*b
d=(a+b)*2
print(c,d)

Solution (Python):
i = j = 0
n = ''
m = ''


line = input()

while line[i] != ' ':
    n = n + line[i]
    i += 1
    
while i < len(line):
    m = m + line[i]
    i += 1
    
n = int(n)
m = int(m)

print(n*m,end=' ')
print(2*n+2*m)

Solution (Python):
a,b = map(int,input().split())
print(a * b , (a + b) * 2)

Solution (Python):
a,b = map(int,input().split())
print(a * b , (a + b) * 2)

Solution (Python):
a,b=[int(x) for x in input().split()]
print(a*b,(a+b)*2)

Solution (Python):
a,b=map(int,input().split())
print(a*b,(a+b)*2)

Solution (Python):
a,b = map(int,input().split())
print(a*b,(a*2 + b*2))

Solution (Python):
a,b = [int(i) for i in input().split()]
print(a*b,a*2+b*2)

Solution (Python):
a,b = [int(x) for x in input().split()]
print(a*b,(a+b)*2)

Solution (Python):
x=input().split()
a = int(x[0])
b = int(x[1])

print( a*b , a*2+b*2 )

Solution (Python):
a,b = input().split()
a = int(a)
b = int(b)
area = a*b
mawari_length = (a+b)*2
print(area,mawari_length)

Solution (Python):
a,b = [int(x) for x in input().split()]
print(a*b,(a+b)*2)

Solution (Python):
[a, b] = map(int,input().split())

print("{} {}".format(a * b , (a + b) * 2))

Solution (Python):
[a, b] = map(int, input().split())
print(a*b, (a+b)*2)

Solution (Python):
[a, b] = map(int, input().split())
print(a*b, (a+b)*2)

Solution (Python):
a,b = [int(i) for i in input().split()]
print(a*b,(a+b)*2)

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

Solution (Python):
a,b = [int(i) for i in input().split()]
print(a*b,a+a+b+b)

Solution (Python):
a,b = [int(i) for i in input().split()]
print(a*b,a*2+b*2)

Solution (Python):
a,b=[int(x) for x in input().split()]
print(a*b,(a+b)*2)

Solution (Python):
x=str(input())
n=x.split(" ", 2)
a=int(n[0])
b=int(n[1])
ab=a*b
a_b=(a+b)*2
print(ab, end=' ')
print(a_b)

Solution (Python):
[a, b] = [int(x) for x in input().split()]
print(a * b ,(a + b) * 2)

Solution (Python):
a,b=[int(x) for x in input().split()]
print(a*b,(a+b)*2)

Solution (Python):
a,b=[int(x) for x in input().split()]
print(a*b,(a+b)*2)

Solution (Python):
a,b=map(int,input().split())
print(a*b,(a+b)*2)

Solution (Python):
x=input().split()
y=list(map(int,x))
a=y[0]
b=y[1]
c=a*b
d=(a+b)*2
print (c,d)

Solution (Python):
a,b=map(int,input().split())
print(a*b,(a+b)*2)

Solution (Python):
a,b=map(int,input().split())
print(a*b,(a+b)*2)

Solution (Python):
a,b=[int(i) for i in input().split()]
print(a*b,(a+b)*2)

Solution (Python):
a,b=map(int,input().split())
print(a*b,(a+b)*2)

Solution (Python):
[a,b] = map(int,input().split())
print(a*b,(a+b)*2)

Solution (Python):
a,b=map(int,input().split())
print (a * b,(a + b) * 2)

Solution (Python):
a, b = map(int, input().split())
print(a * b, (a + b) * 2)

Solution (Python):
item = [int(i) for i in input().split()]
print(item[0]*item[1],2*(item[0]+item[1]))

Solution (Python):
l = input().split()
m = int(l[0]) * int(l[1])
s = int(l[0])*2 + int(l[1]) * 2
print(str(m) + " " + str(s))

Solution (Python):
l = input().split()
m = int(l[0]) * int(l[1])
s = int(l[0]) * 2 + int(l[1]) * 2
print(str(m) + " " + str(s))

Solution (Python):
x = list(map(int,input().split()))
print(str(x[0]*x[1])+" "+str(2*x[0]+2*x[1]))

Solution (Python):
a,b=[int(i) for i in input().split()]
print(a*b,end=" ")
print((a+b)*2)

Solution (Python):
ab = input()
num_ab = ab.split()
a = int(num_ab[0])
b = int(num_ab[1])
print(a*b,2*(a+b))

Solution (Python):
a,b = [int(i) for i in input().split()]
c = a*b
d = (a+b)*2

print("{0} {1}".format(c,d))

Solution (Python):
s = input().rstrip().split(' ')
s1=int(s[0])
s2=int(s[1])
print(s1*s2, 2*s1+2*s2)

Solution (Python):
hoge = input().split()
a = int(hoge[0])
b = int(hoge[1])
print(a*b,(a+b)*2)

Solution (Python):
a, b = [int(s) for s in input().split()]
print(a * b, 2 * (a + b))

Solution (Python):
l = input().split()
a, b = list(map(int, l))
print(a * b, 2 * (a + b))

Solution (Python):
a,b=map(int,raw_input().split())
print a*b,2*(a+b)

Solution (Python):
a,b = list(map(int, input().split()))
x = 2 * (a+ b)
s = a * b
print(str(s) + " " + str(x))

Solution (Python):
a,b=map(int,input().split())
print(a*b,(a+b)*2)

Solution (Python):
A, B = map(int, raw_input().split())
area = A*B
circum = 2*(A + B)
print area, circum

Solution (Python):


a, b = [int(x) for x in input().strip().split(' ')]
print(a*b, 2*(a+b))

Solution (Python):
input_lines = input()
input_i = input_lines.split(" ")
print(int(input_i[0])*int(input_i[1]),end=" ")
print((int(input_i[0])+int(input_i[1]))*2)

Solution (Python):
import sys

a, b = list(map(int, sys.stdin.readline().split()))

print(a*b, 2*a+2*b)

Solution (Python):
x,y=[int(i) for i in input().split()]
s=x*y
l=2*x+2*y
print(s,l)

Solution (Python):
a, b = map(int, input().split())
area = a * b
circumference = 2*a + 2*b
print(area, circumference)

Solution (Python):
if __name__ == '__main__':
	a, b = map(int, input().split())
	area = a * b
	circumference = 2*a + 2*b
	print(area, circumference)

Solution (Python):
x,y=map(int,input().split())
a=x*y
l=(x+y)*2
print(a,l)

Solution (Python):
a,b=map(int,input().split())
c=a*b
d=2*(a+b)
print(c,d)

Solution (Python):
a,b =[int(i) for i in input().split()]

menseki = a*b
nagasa = a*2 + b*2

print(menseki, nagasa)

Solution (Python):
import re

given = input("")

result = re.search(r"([0-9]+)\s([0-9]+)", given)

a = int(result.group(1))
b = int(result.group(2))

x = a * b
y = a*2 + b*2

print(x,y)

Solution (Python):
a,b = [int(s) for s in input().split(' ')]
print('{0} {1}'.format(a*b,2*(a+b)))

Solution (Python):
a, b = map(int, input().split())
print ( a*b, 2*a+2*b )

Solution (Python):

numbers = list(map(int,input().split()))
print(str(numbers[0]*numbers[1])+" "+str((numbers[0]+numbers[1])*2))

Solution (Python):
a = input().split()
print(str(int(a[0])*int(a[1])) + " " + str(2 * int(a[0]) + 2 * int(a[1]) ) )

Solution (Python):
a,b = input().split(' ')
a=int(a)
b=int(b)
print(repr(a*b) +' '+ repr(2*(a+b)))

Solution (Python):
def temp(val):
    [a,b]=val.split()
    a = int(a)
    b = int(b)
    print("{} {}".format(a*b, 2*a+2*b))

temp(input())

Solution (Python):
a,b=list(map(int,input().split()))
print(a*b,2*(a+b))

Solution (Python):
a,b=list(map(int,input().split()))
print(a*b,2*(a+b))

Solution (Python):
a,b=list(map(int,input().split()))
print(a*b,2*(a+b))

Solution (Python):
a,b=list(map(int,input().split()))
print(a*b,2*(a+b))

Solution (Python):
a, b = map(int, input().split())

print( a*b, 2*(a+b), sep = ' ' )

Solution (Python):
a=map(int,raw_input().split())
print a[0]*a[1],2*(a[0]+a[1])

Solution (Python):
a,b = [eval(x) for x in input().split()]
print(a*b,2*(a+b))

Solution (Python):
a,b= map(int, input().split())
print(a*b,2*(a+b))

Solution (Python):
a, b = map(int, input().split())
area = a*b
length = 2*(a+b)
print(area, length)

Solution (Python):
a, b = map(int, input().split())
print(a*b, 2*(a+b))

Solution (Python):
input_line = raw_input().split()

a = int(input_line[0])
b = int(input_line[1])

S = a*b
l = 2*(a+b)

print S, l

Solution (Python):
a,b=list(map(int,input().split()))
print(a*b,(a+b)*2)

Solution (Python):
a, b = map(int, input().split(' '))
print( a * b, 2 * a + 2 * b)