# Enter your code here. Read input from STDIN. Print output to STDOUT

import cmath
# print(*cmath.polar(complex(input())), sep='\n')
print ("%f\n%f" % cmath.polar(complex(input())))
# print ("\n".join(
#     map(str,(import("cmath").polar(
#         complex(input()
#         )))
#         ))
# )
