a = int(input())
b = int(input('))
if a > 0 and b > 0:
print(a+b)
elif a < 0 and b < 0:
print(a*b)
else:
if a > 0:
print(a**2)
print(b**2)
a = int(input())
b = int(input('))
if a > 0 and b > 0:
print(a+b)
elif a < 0 and b < 0:
print(a*b)
else:
if a > 0:
print(a**2)
else:
print(b**2)