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):
import sys
from functools import reduce

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

Solution (Python):
import sys
import operator

for line in sys.stdin:
    nums = list(map(int, line.split()))
    strings = map(str, [operator.mul(*nums),
                        operator.add(*nums) * 2])
    print(" ".join(strings))

Solution (Python):
import sys
import operator

for line in sys.stdin:
    nums = list(map(int, line.split()))
    strings = map(str, [operator.mul(*nums),
                        operator.add(*nums) * 2])
    print(" ".join(strings))

Solution (Python):
import sys
import operator

for line in sys.stdin:
    nums = list(map(int, line.split()))
    strings = map(str, [operator.mul(*nums),
                        operator.add(*nums) * 2])
    print(" ".join(strings))

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


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

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

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

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

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

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,raw_input().split())

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

print str(area)+" "+str(perimeter)

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

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

Solution (Python):
height,width = map(int, input().split())
area = height * width
circumference = height * 2 + width * 2
print(area, circumference, sep = ' ')

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

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

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

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

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

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

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

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

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

Solution (Python):

line = input().split()

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

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

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

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

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

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

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

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

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

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

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

if 1<=a and a<=100 and 1<=b and b<=100:
  area=a*b
  cir=(a+b)*2
  print(area,cir)
else:
  print("error")

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

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

print(s,l)

Solution (Python):

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

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

Solution (Python):
ab = [int(n) for n in input().split()]
 
S = ab[0]*ab[1]
L = 2*ab[0] + 2*ab[1]
 
print(" ".join(map(str,[S,L])))

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):
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())
S=a*b
lng=2*(a+b)
print(S,lng)

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

s=a*b
sum=a*2+b*2

print(s,sum)

Solution (Python):

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

r=a*b
length=a*2+b*2
print(r,length)

Solution (Python):


def area(a,b):
    c=a*b
    return c

def perimeter_of_the_rectangle(a,b):
    c=(a+b)*2
    return c

def Rectangle():
    a,b=map(int,input().split())
    c=area(a,b)
    d=perimeter_of_the_rectangle(a,b)
    print("{} {}".format(c,d))

if __name__ == '__main__':
    Rectangle()

Solution (Python):
def area(a,b):
    c=a*b
    return c
def perimeter_of_the_rectangle(a,b):
    c=(a+b)*2
    return c
def Rectangle():
    a,b=map(int,input().split())
    c=area(a,b)
    d=perimeter_of_the_rectangle(a,b)
    print("{} {}".format(c,d))
    
if __name__ == '__main__':
    Rectangle()

Solution (Python):
data = input().split(' ')
data2 = [int(x) for x in data]
area = data2[0] * data2[1]

perimeter = (data2[0]+data2[1])*2
ans = str(area) + ' '  + str(perimeter)
print(ans)

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

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

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

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

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())
A=a*b
R=a+a+b+b
print(A,R)

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

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

Solution (Python):
a=input() 
line=a.split()
x=int(line[0])
y=int(line[1])
z1=x*y
z2=x*2+y*2
z3=str(z1)
z4=str(z2)
print(z3,z4)

Solution (Python):


x,y=map(int, input().split())
w=x*y
z=2*x+2*y

print(w,z)

Solution (Python):


x,y=map(int, input().split())
w=x*y
z=2*x+2*y

print(w,z)

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


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

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


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

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

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

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

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

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

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

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

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

s = a*b

p = 2*a+2*b

print(s,p)

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):


def main():
    a, b = map(int, input().split())  
    area = a*b
    length = a*2 + b*2
    print('{0} {1}'.format(area, length))

main()

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

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

Solution (Python):
def numinput():
    a = input().split()
    for i in range(len(a)):
        a[i] = int(a[i])
    return a

def main():
    a = numinput()
    print('%d %d' % (a[0] * a[1], 2 * (a[0] + a[1])))

if __name__ == "__main__":
    main()

Solution (Python):
numbers = input()
lines = numbers.split(" ")
a = int(lines[0])
b = int(lines[1])
area = str(a * b)
line = str(2 * (a + b))

print(area + " " + line)

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

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

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
perimeter = 2 * a + 2 * b
print(area,end = " ")
print(perimeter)

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

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

Solution (Python):
x, y = map(int, input().split())
print('{0} {1}'.format(str(x*y), str((x+y)*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, 2*(a+b))

Solution (Python):

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

Solution (Python):


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

Solution (Python):

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

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

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

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

Solution (Python):

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

print('%s %d' % (a[0]*a[1], 2*a[0]+2*a[1]))

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

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

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

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

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

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

print(f'{area} {length}')

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

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

print(str(men) + ' ' + str(syu))

Solution (Python):
import sys

if __name__ == '__main__':
    import doctest
    doctest.testmod()
    a, b = map(int, sys.stdin.read().split())
    print a * b, 2 * (a + b)

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

Solution (Python):
x,y=map(int,input().split())
perimeter=2*x+2*y
area= x*y
print('{0} {1}'.format(str(area),str(perimeter)))

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

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

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

print(men,hen,sep=" ")

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

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

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

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

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

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

Solution (Python):
p,q = input().split()
a = int(p)
b = int(q)
c = a*b
d = 2*(a+b)
print(str(c) + ' ' + str(d))

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

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

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

print("{0} {1}".format(area, perimeter))

Solution (Python):


length = [int(i) for i in input().rstrip().split()]

height = length[0]
breadth = length[1]


rectangleArea = height * breadth

rectanglePerimeter = (height + breadth) * 2

print(rectangleArea, rectanglePerimeter)

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

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

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

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

Solution (Python):
number = input()

number_list = number.split(' ')

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

if 1 <= a <= 100 and 1 <= b <= 100:
    menseki = a * b
    nagasa = 2 * (a + b)

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

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

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

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

Solution (Python):
a,b = input().split()
a = int( a )
b = int( b )
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(' '))

s = a*b
r = 2*(a+b)

print(s, r)

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

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

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

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

Solution (Python):



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

Solution (Python):
stdin = input()
hw = stdin.split(" ")
h = (int)(hw[0])
w = (int)(hw[1])
area = h * w
perimeter = h * 2 + w * 2

print(area, perimeter)

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

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

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

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

Solution (Python):



def main():
	a, b = [int(x) for x in raw_input().split(" ")]
	print a * b, (a + b) * 2

if __name__ == '__main__':
	main()

Solution (Python):
import sys
for x in sys.stdin:
    a=[int(i) for i in x.split(' ')]
    print '%d %d' %(a[0]*a[1], 2*(a[0]+a[1]))

Solution (Python):
import sys
for x in sys.stdin:
    a,b=x.split(' ')
    a,b=int(a),int(b)
    print '%d %d' %(a*b, 2*(a+b))

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

Solution (Python):
from __future__ import division, print_function
from sys import stdin
a, b = (int(s) for s in stdin.readline().split())
print(a*b, a+a+b+b)

Solution (Python):
import sys
for line in sys.stdin:
    cols = map(int, line.rstrip('\n').split(' '))
    a, b = cols[0], cols[1]
    print '%d %d' % (a*b, 2*(a+b))

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

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

Solution (Python):
import sys

for line in sys.stdin:
    A=line.split()
    B=map(int,A)
    S=B[0]*B[1]
    l=(B[0]+B[1])*2
    print S,l

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

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

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

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

Solution (Python):
i = raw_input()
a = i.split()

totalLength = 0
for length in a:
    totalLength += int(length) * 2

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

print str(menseki)+" "+str(totalLength)

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 ' '.join(map(str,[a*b, (a+b)*2]))

Solution (Python):





if __name__ == '__main__':
    x, y = map(int, raw_input().split())
    print x * y, 2 * (x + y)

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

Solution (Python):


import sys

n = raw_input().split()

square = int(n[0]) * int(n[1])
circum = 2 * (int(n[0]) + int(n[1]))

sys.stdout.write(str(square))
sys.stdout.write(" ")
sys.stdout.write(str(circum))
sys.stdout.write("\n")

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

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

Solution (Python):
sids = input()
side_list = []

side_list = [int(s) for s in sids.split(' ', )]

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

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

Solution (Python):
import sys

a, b = [int(i) for i in sys.stdin.readline().split(' ')]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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("{} {}".format(a*b, a*2+b*2))

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

a = x * y
s = 2*x + 2*y

print(a,s)

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,(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())
men = a*b
length = 2*a + 2*b
print(str(men)+" "+str(length))

Solution (Python):
height, width = list(map(int, input().split()))

print(height*width, end = " ")
print(2*(height+width))

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

Solution (Python):
vertical,horizontal=(int(x) for x in input().split())
print(vertical*horizontal,2*(vertical+horizontal))

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

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

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

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

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

print(S, L)

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

Solution (Python):
l = input().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+b)*2)

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

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

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

print(area , rectangle)

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

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

print(s, l)

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


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

print(c, d)

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

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

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


m= a * b

n= 2*a + 2*b

print(str(m)+" "+str(n))

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

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

print(y,x)

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

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, raw_input().split())

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

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

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 = map(int,input().split())

print(A*B,2*(A+B))

Solution (Python):
def mapt(fn, *args):
    return tuple(map(fn, *args))
    
n = mapt(int, input().split(" "))
def aa(n):
    a, b = n
    print(a*b, (a+b)*2)
aa(n)

Solution (Python):
A, B = map(int, input().split())

print(A*B, 2*(A+B))

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

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

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

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

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

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(str(a*b)+" "+str(a*2+b*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=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())

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

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

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

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

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

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

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

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

a = int(a)
b = int(b)

menseki = a*b
syuui = (a+b)*2

print("{} {}".format(menseki, syuui))

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

Solution (Python):
l, w = map(int, input().split())
area = l * w
rec = 2 * (l + w)
print("{} {}" .format(area, rec))

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

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

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

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

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

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

m = int(a)*int(b)
n = 2*(int(a)+int(b))

print(m,n)

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

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


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

Solution (Python):



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

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

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