<gh_stars>0
# Problem: https://www.hackerrank.com/challenges/polar-coordinates/problem
# Score: 10.0


import cmath
print(*cmath.polar(complex(input())), sep='\n')

# Problem: https://www.hackerrank.com/challenges/polar-coordinates/problem
# Score: 10.0


import cmath
print(*cmath.polar(complex(input())), sep='\n')
# Problem: https://www.hackerrank.com/challenges/polar-coordinates/problem # Score: 10.0