#include #include #include using namespace std; int main() { double x0, y0, t0, a0, b0, c0, d0, a1, b1, c1, d1; cin >> x0 >> y0 >> t0 >> a0 >> b0 >> c0 >> d0 >> a1 >> b1 >> c1 >> d1; double e0 = c0 - a0, f0 = d0 - b0, e1 = c1 - a1, f1 = d1 - b1; double dir0 = atan2(f0, e0), dir1 = atan2(f1, e1); double dt = dir0 - dir1; if (dt < 0) dt += 2*M_PI; double dx = a0 - x0 - (a1 - x0) * cos(dt) + (b1 - y0) * sin(dt); double dy = b0 - y0 - (a1 - x0) * sin(dt) - (b1 - y0) * cos(dt); cout << setprecision(12) << x0 + dx << ' ' << y0 + dy << ' ' << t0 + 180 * dt / M_PI << endl; }