#include <iostream>
#include <cmath>
#include <iomanip>

using namespace std;

struct point {
    long double x, y;

    // сложение
    point operator+(point const &r) const {
        return {x + r.x, y + r.y};
    }
    point &operator+=(point const &r) {
        return *this = *this + r;
    }

    // унарный минус
    point operator-() const {
        return {-x, -y};
    }

    // вычитание
    point operator-(point const &r) const {
        return {x - r.x, y - r.y};
    }
    point &operator-=(point const &r) {
        return *this = *this - r;
    }

    // скалярное и векторное произведения
    long double operator*(point const &r) const {
        return x * r.x + y * r.y;
    }
    long double operator^(point const &r) const {
        return x * r.y - r.x * y;
    }

    long double argument() const {
        return atan2(y, x);
    }
    long double length() const {
        return sqrt(x * x + y * y);
    }

    point rotate(long double alpha) const {
        return {x * cos(alpha) - y * sin(alpha), x * sin(alpha) + y * cos(alpha)};
    }
};

int main() {

    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    point a{1, 1}, b{10, -12};
    point c = (a + b).rotate(M_PI_2);

    cout << c.length() << ' ';
    cout << fixed << setprecision(10);
    cout << c.argument() << '\n';

}
