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):
z = input()
x,y= z.split()
a = int(x)*int(y)
b = int(x)*2+ int(y)*2
print("{} {}".format(a,b))

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

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

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

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

Solution (Python):
N, M = list(map(int, input().split()))
S = N*M
L = 2*(N+M)
print(S,L)

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

def SquareArea(a, b):
	return a * b

def SideLength(a, b):
	return (a + b)*2

print('{} {}'.format(SquareArea(a, b),SideLength(a, b)))

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

Solution (Python):
def Area(a, b):
    return a*b

def Lap(a, b):
    return 2*(a+b)

num = input()
a,b = num.split()
a = int(a)
b = int(b)
print('{} {}'.format(Area(a,b), Lap(a,b)))

Solution (Python):

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

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

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

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

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

Solution (Python):
tmp = input()
tmp = tmp.split(" ")

tmp = list(map(int,tmp))

print(tmp[0]*tmp[1],2*(tmp[1]+tmp[0]))

Solution (Python):
x = input()
x = x.split(" ")
x = list(map(int,x))

a = x[0]*x[1]
b = 2*(x[0]+x[1])

print("{0} {1}".format(a,b))

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

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

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

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

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())
s=a*b
l=(a+b)*2
print(s,l)

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

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

c,d = a * b,(a + b) *2

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

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

Solution (Python):


import sys, math, os


PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")

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

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

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

men = a*b
hen = (a+b)*2

print(int(men),int(hen))

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

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

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

Solution (Python):

x = input()
split_x = x.split(sep=" ")
a = int(split_x[0])
b = int(split_x[1])


Circumference = str(a*2 + b*2)
Area = str(a *b)
print(Area + " " + Circumference)

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

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

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

y=a*b
z=a*2+b*2

print y,z

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

a=int(x[0])
b=int(x[1])
y=a*b
z=a*2+b*2
print y,z

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

y=a*b
z=a*2+b*2

print y,z

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

area = x * y
length = (x+y)*2
print(area, length)

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

S = a * b
L = 2 * (a + b)
print('{} {}'.format(S, L))

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

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

Solution (Python):

i = input().split()

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

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

print("%d %d" % (area, perimeter))

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

Solution (Python):
a,b = map(int,raw_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=map(int,raw_input().split())
print a*b,(a+b)*2

Solution (Python):
n = input().split()
n_int = list(map(int,n))
a = n_int[0]
b = n_int[1]
area = a * b
per = a * 2 + b * 2
print(str(area) + " " +str(per))

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

Solution (Python):
def length(a, b):
    return 2*a+2*b
def space (a, b):
    return a * b
    
list = map(int, raw_input().split(' '))
print u'{} {}'.format(space(list[0], list[1]), length(list[0],list[1]))

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):
a , b = (int(i) for i in input().split())

area = a * b
around = 2 * (a + b)
print(area, around)

Solution (Python):
a, b = eval(input().replace(' ', ','))
print("{} {}".format(a*b, 2*(a+b)))

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

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

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):
a,b=map(int, input().split())
print(a*b, 2*(a+b))

Solution (Python):
a,b=input().split()
if int(a)<1 or int(b)>100:
    exit()
else:
   c=int(a)*int(b)
   d=int(a)*2+int(b)*2

print(c,d)

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

sq=a*b
ci=a*2+b*2

print(sq,ci)

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
my_value = input()
my_value_list = ([int(x) for x in my_value.split()])

print("{} {}".format(my_value_list[0]*my_value_list[1], (my_value_list[0]+my_value_list[1])*2))

Solution (Python):




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


if __name__ == '__main__':
    main()

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

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

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

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

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

def P(x,y):
 print(x*y,2*(x+y))
 return 0

P(a,b)

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*2+b*2)

Solution (Python):

a, b = [int(x) for x in input().split()]

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

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,2*(a+b))

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

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

Solution (Python):
z = input()
m,l = z.split()
s = int(m) * int(l)
n = int(m)*2 + int(l)*2

print("{} {}".format(str(s),str(n)))

Solution (Python):
inputs = input().split(' ')
l = int(inputs[0])
b = int(inputs[1])
area = l * b
perimeter = (l + b) * 2
print('%i %i' % (area, perimeter))

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

Solution (Python):
def main():
    x = input()
    x1, x2 = x.split(' ') 
    a = int(x1)
    b = int(x2)
    print(a*b, 2*(a+b))

if __name__ == "__main__":
    main()

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

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

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

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

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

men = int(a[0]) * int(a[1])

syu = int(a[0]) * 2 + int(a[1]) * 2

print(men, syu)

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, input().split())
x = a*b
y = 2*a + 2*b
print(x ,y)

Solution (Python):

list = input().split(" ")
flist = map(int,list)
sum = 0
multi = 1

for i in flist:
    sum = sum + 2 * i
    multi = multi * i
print(str(multi) + " " + str(sum))

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

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

Solution (Python):


s = input().rstrip().split(' ')


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


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

Solution (Python):



s = input().rstrip().split(' ')
a = int(s[0])
b = int(s[1])

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

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

Solution (Python):
input = input()

x, y = input.split(' ')

print(int(x) * int(y), int(x) * 2 + int(y) * 2)

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

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

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

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

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

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

Solution (Python):
deglist = raw_input().split(" ")
height = int(deglist[0])
width = int(deglist[1])
menseki = height * width
nagasa = 2 * (height + width)
print menseki, nagasa

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

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

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

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

def rectangle(a,b):
	s=a*b
	l=2*a+2*b
	print(s,l)

rectangle(a,b)

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

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

if __name__ == "__main__":
    main()

Solution (Python):
inputStr = raw_input()
for i in range(0, len(inputStr)):
  if(inputStr[i] == ' '):
    surface = int(inputStr[:i]) * int(inputStr[i+1:])
    edge = (int(inputStr[:i]) + int(inputStr[i+1:])) * 2
    print(str(surface) + ' ' + str(edge))

Solution (Python):
inputStr = input()
for i in range(0, len(inputStr)):
  if(inputStr[i] == ' '):
    surface = int(inputStr[:i]) * int(inputStr[i+1:])
    edge = (int(inputStr[:i]) + int(inputStr[i+1:])) * 2
    print(str(surface) + ' ' + str(edge))

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

Solution (Python):
def main():
    input_string = input('')
    elements = input_string.split(' ')
    height_a = int(elements[0])
    width_b = int(elements[1])
    print('%d %d' % ((height_a * width_b), (2 * height_a + 2 * width_b)))

main()

Solution (Python):
def main():

    [height_a, width_b] = list(map(int, input().split()))
    print('%d %d' % ((height_a * width_b), (2 * height_a + 2 * width_b)))


main()

Solution (Python):

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

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

Solution (Python):
"""
x = 10
y = input("y?>")

print("{} {}".format(x, y))
"""

s = input()

a_and_b = s.split(" ")


a = int(a_and_b[0])
b = int(a_and_b[1])
"""
print(a)
print(type(a))
"""
square = a*b
long = (a+b)*2

print("{} {}".format(square, long))

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

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


print(x*y, end=' ')


print(2*x+2*y)

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

Solution (Python):
h,w=map(int,raw_input().split())
print("%d %d"%(h*w,h*2+w*2))

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

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

Solution (Python):

"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_1_C&lang=jp

"""
import sys
from sys import stdin
input = stdin.readline


def main(args):
    a, b = map(int, input().split())
    print(a*b, (a*2 + b*2))


if __name__ == '__main__':
    main(sys.argv[1:])

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

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

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

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

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

Solution (Python):
a, b = input().split( )
a = int(a)
b = int(b)
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=map(int,input().split())
print(str(int(a*b))+" "+str(2*(a+b)))

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

Solution (Python):
import fileinput

for line in fileinput.input():
  a, b = map(int, line.strip().split())

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

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

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

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

print('{} {}'.format(area, perimerter))

Solution (Python):
import sys
l = sys.stdin.readline()
list = map(int, l.split())
width = list[0]
height = list[1]
area = width * height
peri = width * 2 + height * 2
print(str(area) + " " + str(peri))

Solution (Python):
InputData=[]
while True:
    try:
        in1,in2 = map(int,raw_input().split(" "))  
        if in1==0 and in2==0 : break
        InputData.append([in1,in2])
    except EOFError:
        break

for i in range(len(InputData)):
    in1,in2 = InputData[i]
    print(str(in1 * in2) + " " + str((in1 + in2) * 2))

Solution (Python):
InputData=[]
while True:
    try:
        in1,in2 = map(int,raw_input().split(" "))  
        if in1==0 and in2==0 : break
        InputData.append([in1,in2])
    except EOFError:
        break

for i in range(len(InputData)):
    in1,in2 = InputData[i]
    x = int(in1) * int(in2)
    y = int(in1) + int(in2) + int(in1) + int(in2)
    print(str(x) + " " + str(y))

Solution (Python):
InputData=[]
while True:
    try:
        in1,in2 = map(int,raw_input().split(" "))  
        if in1==0 and in2==0 : break
        InputData.append([in1,in2])
    except EOFError:
        break

for i in range(len(InputData)):
    in1,in2 = InputData[i]
    x = int(in1) * int(in2)
    y = (int(in1) + int(in2)) * 2
    print(str(x) + " " + str(y))

Solution (Python):
a = input()
num = a.split()
x, y = int(num[0]), int(num[1])
if (1 <= x <= 100) and (1 <= y <= 100):
    print(str(x * y)+ ' ' +  str((x + y) * 2))

Solution (Python):
InputData=[]
while True:
    try:
        in1,in2 = map(int,raw_input().split(" "))  
        if in1==0 and in2==0 : break
        InputData.append([in1,in2])
    except EOFError:
        break

for i in range(len(InputData)):
    in1,in2 = InputData[i]
    x = int(in1) * int(in2)
    y = (int(in1) + int(in2)) * 2
    print(str(x) + " " + str(y))

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

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

if __name__ == "__main__":
    main()

Solution (Python):
i=input()
 
a,b = i.split(' ')
v,h = int(a),int(b)
 
area = v * h
div = 2 * (v + h)
 
print(' '.join([str(area),str(div)]))

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

    if a <= 0 or a >= 101 or b <= 0 or b >= 101:
        print("invalid answer.")
        return

    ans1 = a*b
    ans2 = (a+b)*2

    print("{0} {1}".format(ans1,ans2))

if __name__ == '__main__':
    main()

Solution (Python):
def getSquare(h, w):
    return h * w

def getShuu(h, w):
    return 2*h + 2*w

a, b = map(int, input().split())
print("{} {}".format(getSquare(a,b), getShuu(a,b)))

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

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

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

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

print numArray[0]*numArray[1], (numArray[0]+numArray[1])*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,a*2+b*2)

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

Solution (Python):
a,b=[int(s) for s 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):
data = input()
a, b = [int(i) for i in data.split()]
print(a * b, (a + b) * 2)

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

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

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

Solution (Python):

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

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

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

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

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

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

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

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

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

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

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 = list(map(int, input().split()))
area = a[0]*a[1]
rectangle = 2 * (a[0]+a[1])
print(area,rectangle)

Solution (Python):
a , b = map(int, raw_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):
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 + 2 * b))

Solution (Python):
instr = input()

sep = instr.split()
a = int(sep[0])
b = int(sep[1])

area = a * b
perimit = 2 * a + 2 * b

print(str(area) + ' ' + str(perimit))

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

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

Solution (Python):


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

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

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

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

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

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

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

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

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

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

Solution (Python):

"""
Created on Tue Jan 09 20:40:07 2018

@author: Fujiichang
"""

if __name__ == "__main__":
    a = map(int, raw_input().split())
    square = a[0] * a[1]
    perimeter = 2*a[0] + 2*a[1]

    print square, perimeter

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

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


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

Solution (Python):
a,b = map(float, input().split())
A = a*b
C = a*2+b*2

print(int(A), int(C))

Solution (Python):
input_lines = input()
s = input_lines.rstrip().split(' ')
menseki = int(s[0]) * int(s[1])
nagasa = ( int(s[0]) + int(s[1]) ) * 2

text = str(menseki)+" "+str(nagasa)
print(text)

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

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

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

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

Solution (Python):
x = input()
x = x.split()
a = int(x[0])
b = int(x[1])
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)

area = a * b
circumference = 2 * a + 2 * b

print(area, circumference)

Solution (Python):


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

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

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

Solution (Python):
def get_area(a, b):
    return a * b

def get_perimeter(a, b):
    return (a * 2) + (b * 2)

if __name__ == '__main__':
    a, b = map(int, input().split(' '))
    area = get_area(a, b)
    perimeter = get_perimeter(a, b)
    print('{} {}'.format(area, perimeter))

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

t,y=s
a,b=int(t),int(y)

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

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

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

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

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

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

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

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

area = int(tateyoko[0]) * int(tateyoko[1])
circuit = int(tateyoko[0]) * 2 + int(tateyoko[1]) * 2

print(str(area) + ' ' + str(circuit))

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):


i, j = (int(i) for i in input().split(' '))
print(str(i*j) + ' ' + str(i*2 + j*2))

Solution (Python):


import sys

a,b = map(int, sys.stdin.readline().split())
print(a*b, 2*(a+b))

Solution (Python):
import sys
a,b = map(int,sys.stdin.readline().split())
print(a*b,2*(a+b))

Solution (Python):
import sys
a,b=map(int,sys.stdin.readline().split())
print(a*b,2*(a+b))

Solution (Python):
import sys
a,b=map(int,sys.stdin.readline().split())
print(a*b,2*(a+b))

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

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

print(s,l)

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

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

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

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

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

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

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

S = l[0] * l[1]
N = l[0]*2 + l[1]*2

print(str(S) +' '+ str(N))

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

Solution (Python):
while True:
    a, b = map(int, input().split())
    if a >= 1 and a <= 100:
        if b >= 1 and b <= 100:
            break

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

Solution (Python):
import sys
input_data = input()
input_numbers = input_data.split()

if __name__ == '__main__':
    area = int(input_numbers[0]) * int(input_numbers[1])
    perimeter = (int(input_numbers[0]) * 2) + (int(input_numbers[1]) * 2)
    print(str(area) + " " + str(perimeter))

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

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

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

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

print(h*w, 2*h+2*w)

Solution (Python):

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

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

print('{} {}'.format(area, circle))

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

Solution (Python):
z = input()

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

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

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

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

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

Solution (Python):


if __name__=='__main__':
    a, b = map(int, raw_input().split())
    print "{} {}". format(a*b, 2*(a+b))

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

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

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

Solution (Python):
rectangle = input().split()
tate = int(rectangle[0])
yoko = int(rectangle[1])

menseki = tate * yoko
syu = tate * 2 + yoko * 2
print(menseki,syu)

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

a=int(l[0])*int(l[1])
b=2*int(l[0])+2*int(l[1])

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

Solution (Python):
a = list(map(int,input().split(' ')))
A = int(a[0] * a[1])
S=int(2*(a[0] + a[1]))
print(str(A) + ' '+ str(S))

Solution (Python):


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

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

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, 2 * (a + b))

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

Solution (Python):
def Area(x,y):
    return x*y


def Perimeter(x,y):
    return 2*x+2*y


text = input()

a, b= text.split(" ")

ANS_1 = Area(int(a),int(b))
ANS_2 = Perimeter(int(a),int(b))

ANSWER = str(ANS_1) + " " + str(ANS_2)

print(ANSWER)

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

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

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

Solution (Python):
a,b = list(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+2*b))

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

Solution (Python):





def main(l_):
    a, b = l_[0], l_[1]
    area = a * b
    perimeter = (a + b) * 2
    print('{} {}'.format(area, perimeter))
    
    
if '__main__' == __name__:
    try:
        while True:
            main(list(map(int,input().strip().split(' '))))
    except EOFError:
        pass

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

x = int(list[0])
y = int(list[1])

a1 = x * y
a2 = x * 2 + y * 2

print(str(a1) + " " + str(a2))

Solution (Python):


x = input()

y = list(map(int,x.split()))

a = y[0]
b = y[1]

c = a*b
d = (a+b)*2

print(c,d)

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

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

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

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

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

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

Solution (Python):
import sys

for line in sys.stdin:
    nums = list(map(lambda x: int(x), line.split()))
    menseki = nums[0] * nums[1]
    syuu = nums[0] * 2 + nums[1] * 2
    print(str(menseki) + " " + str(syuu))

Solution (Python):
import sys
import functools

for line in sys.stdin:
    nums = list(map(lambda x: int(x), line.split()))
    menseki = functools.reduce(lambda x, y: x * y, nums)
    syuu = functools.reduce(lambda x, y: x + y, nums) * 2
    print(str(menseki) + " " + str(syuu))