#include using namespace std; //#define official #ifdef official #define cin inF #define cout outF #endif ifstream inF("mp.in"); ofstream outF("mp.out"); double x, y, d; void input() { cin >> x >> y >> d; } void output() { cout << fixed << setprecision(5) << x << ' '; cout << fixed << setprecision(5) << y << '\n'; } const int N = 1000000; //1e6 void solve() { double tDist = sqrt(x * x + y * y); double px = 0; for (int i = 1; i <= N; ++i) { double prevPx = d * i / N; double px = d * i / N; double dx = x - px; double dy = y; double dist = sqrt(dx * dx + dy * dy); double movDist = tDist - dist; double newX = x + dx * movDist / dist; double newY = y + dy * movDist / dist; double dx2 = (x + newX) / 2 - (px + prevPx) / 2; double dy2 = (y + newY) / 2; double a = dx2 * dx2 + dy2 * dy2; double b = 2 * (dx2 * dx + dy2 * dy); double c = dx * dx + dy * dy - tDist * tDist; double d = b * b - 4 * a * c; if (d < 0) d = 0; double k = (-b + sqrt(d)) / (2 * a); x += dx2 * k; y += dy2 * k; } } int main() { input(); solve(); output(); return 0; }