#include <iostream>
#include <complex>
#include <cmath>
#include <iomanip>
using namespace std;
const double PI = acos(-1.0);
int main()
{
double X, Y, A, k;
while (cin >> X >> Y >> A >> k)
{
A = A * PI / 180.0;
complex<double> a(X, Y);
complex<double> b(1 - k * cos(A), -k * sin(A));
complex<double> c = a / b;
cout << fixed << setprecision(3) << "(" << c.real() << "," << c.imag() << ")" << endl;
}
return 0;
}