注意x 0的输入测试点
if __name__ == '__main__':
inputs = input().split()
r = ""
hasE = False
for i in range(0, len(inputs), 2):
if int(inputs[i + 1]) != 0:
hasE = True
r += (str(int(inputs[i]) * int(inputs[i + 1])) + " " + str(int(inputs[i + 1]) - 1) + " ")
if hasE:
print(r[:-1])
else:
print("0 0")