#include <bits/stdc++.h>

using namespace std;
using ll = long long;
// #define int ll
using PII = pair<ll, ll>;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()

template<typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template<typename T> T &chmax(T &a, const T &b) { return a = max(a, b); }
template<typename T> bool IN(T a, T b, T x) { return a<=x&&x<b; }
template<typename T> T ceil(T a, T b) { return a/b + !!(a%b); }

template<typename T> vector<T> make_v(size_t a) { return vector<T>(a); }
template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts) { 
    return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}
template<typename T,typename V> typename enable_if<is_class<T>::value==0>::type
fill_v(T &t, const V &v) { t=v; }
template<typename T,typename V> typename enable_if<is_class<T>::value!=0>::type
fill_v(T &t, const V &v ) { for(auto &e:t) fill_v(e,v); }

template<class S,class T>
ostream &operator <<(ostream& out,const pair<S,T>& a){
    out<<'('<<a.first<<','<<a.second<<')'; return out;
}
template<class T>
ostream &operator <<(ostream& out,const vector<T>& a){
    out<<'['; for(T i: a) {out<<i<<',';} out<<']'; return out;
}

int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0}; // DRUL
const int INF = 1<<30;
const ll LLINF = 1LL<<60;
const ll MOD = 1000000007;

const double EPS = 1e-8;

using R = long double; // Rにmint渡せるようにする
using P = complex<R>;
using L = pair<P,P>;
using G = vector<P>;
struct C {
    P c; R r;
    C() {}
    C(const P &a, const R &b) : c(a), r(b) {}
};
struct S : public L {
    S() {}
    S(const P &a, const P &b) : L(a,b) {}
};

inline int sgn(const R& r) { return (r>EPS) - (r<-EPS); }
inline R dot(const P& a, const P& b) {
    return real(a)*real(b) + imag(a)*imag(b);
}
inline R det(const P& a, const P& b) {
    return real(a)*imag(b) - imag(a)*real(b);
}
inline P vec(const L& l) {return l.second - l.first;}
namespace std {
	bool operator < (const P& a, const P& b) {
		return sgn(real(a-b)) ? real(a-b) < 0 : sgn(imag(a-b)) < 0;
	}
	bool operator == (const P& a, const P& b) {
		return sgn(real(a-b)) == 0 && sgn(imag(a-b)) == 0;
	}
    bool cmp_y (const P& a, const P& b) {
        return sgn(imag(a-b)) ? imag(a-b) < 0 : sgn(real(a-b)) < 0;
    }
}

// P,L,Sについて入力
inline istream& operator>>(istream& is, P& p) {
    R x, y;
    is >> x >> y;
    p = P(x, y);
    return is;
}
inline istream& operator>>(istream& is, L& l) {
    P a, b;
    is >> a >> b;
    l = L(a, b);
    return is;
}
inline istream& operator>>(istream& is, S& s) {
    P a, b;
    is >> a >> b;
    s = S(a, b);
    return is;
}

// 線分abから見たcの位置
enum CCW{LEFT=1, RIGHT=2, BACK=4, FRONT=8, ON_SEG=16};
int ccw(P a, P b, P c) {
	P p = (c-a)/(b-a);
	if(sgn(imag(p)) > 0) return LEFT;
	if(sgn(imag(p)) < 0) return RIGHT;
	if(sgn(real(p)) < 0) return BACK;
	if(sgn(real(p)-1) > 0) return FRONT;
	return ON_SEG;
}

// 点aを通る接線を返す
// pl = ((a, 接線と円の交点), (a, 接線と円の交点))
pair<L,L> tangent(C c, P a) {
    pair<L,L> pl;
    if(sgn(abs(a-c.c)-c.r) == 0) { // 点 a が円周上にあるとき
        auto normal = [](P a) {
            L vp({a*P(0,1), a*P(0,-1)});
            return vp;
        };
        L l = normal(a-c.c); // 法線ベクトル
        l.first += a; l.second += a;
        pl.first = pl.second = l;
    } else if(sgn(abs(a-c.c)-c.r) > 0) { // 点 a が円の外側にあるとき
        double xp = a.real() - c.c.real();
        double yp = a.imag() - c.c.imag();
        double A = sqrt(xp*xp + yp*yp - c.r*c.r);
        double B = xp*xp + yp*yp;
        P p1(c.r*(xp*c.r + yp*A)/B , c.r*(yp*c.r - xp*A)/B);
        P p2(c.r*(xp*c.r - yp*A)/B , c.r*(yp*c.r + xp*A)/B);
        pl = make_pair(L(a ,p1+c.c), L(a ,p2+c.c));
    } else { // 点 a が円の内側にあるとき
        pl.first = pl.second = L(P(INF,INF), P(INF,INF));
    }
    return pl;
}

signed main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);

    P p;
    C c;
    cin >> p >> c.c >> c.r;
    
    auto ret = tangent(c, p);
    // cout << ret.first << endl << ret.second << endl;
    P p1 = ret.first.second, p2 = ret.second.second;
    if(p1 < p2) {
        cout << p1.real() << " " << p1.imag() << endl;
        cout << p2.real() << " " << p2.imag() << endl;
    } else {
        cout << p2.real() << " " << p2.imag() << endl;
        cout << p1.real() << " " << p1.imag() << endl;
    }

    return 0;
}


Measured memory_bytes: 3372