#-*-coding:utf-8-*-
import math
''' 定义a, b'''
a, b = 3, 4
'''自定义输入一个虚数的实部和虚部'''
input_real = float(input('Enter the real part of the complex number: '))
input_imag = float(input('Enter the imaginary part of the complex number: '))
'''初始化两个虚数'''
c1, c2 = complex(a, b), complex(input_real, input_imag)
'''计算出product1'''
product1 = c1*c2
'''按要求计算出两个角的度数'''
r1 = abs(c1)
theta1 = math.atan2(b,a)
r2 = complex(math.sqrt(input_real), input_imag)
theta2 = math.atan2(input_imag, input_real)
'''根据计算出的两个角度计算product2'''
product2 = r1*r2*complex(math.cos(theta1+theta2), math.sin(theta1+theta2))
print(product1*product2, product1-product2)