import math from math import sin, cos, radians #theta = input() #theta = radians(theta) x = input() y = input() z = complex(x,y) i = 0 print i, z.real, z.imag k = input() l = input() theta = 2.0*math.pi*l/k for i in range(1,k+1): z1 = (cos(theta)*z-sin(theta))/(sin(theta)*z+cos(theta)) print i, z1.real, z1.imag z =z1