#include<bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define HUGE_NUM 99999999999999999
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;



struct Point{
	Point(double arg_x,double arg_y){
		x = arg_x;
		y = arg_y;
	}

	Point(){
		x = y = 0.0;
	}

	Point operator + (Point p){ return Point(x+p.x,y+p.y); }
	Point operator - (Point p){ return Point(x-p.x,y-p.y);}
	Point operator * (double a){ return Point(a*x,a*y); }
	Point operator / (double a){ return Point(x/a,y/a); }

	double abs(){ return sqrt(norm()); }
	double norm(){ return x*x + y*y; }

	bool operator<(const Point &p) const{
		return x != p.x? x < p.x: y < p.y;
	}

	bool operator == (const Point &p) const{
		return fabs(x-p.x) < EPS && fabs(y-p.y) < EPS;
	}

	double x,y;
};

typedef Point Vector;

struct Sphere{
	Point center;
	double r;
};

typedef Sphere Circle;

struct Line{
public:
	Point p[2];
	Line(Point p1,Point p2){
		p[0] = p1;
		p[1] = p2;
	}
	Line(){

	}
};

double NUM = 10000;

double norm(Vector a){
	return a.x*a.x+a.y*a.y;
}

double abs(Vector a){
	return sqrt(norm(a));
}

double cross(Vector a,Vector b){
    return a.x*b.y-a.y*b.x;
}

double dot(Vector a,Vector b){
    return a.x*b.x + a.y*b.y;
}

Point project(Line l,Point p){

	Vector base = l.p[1]-l.p[0];
	double r = dot(p-l.p[0],base)/norm(base);
	return l.p[0]+base*r;
}

//円と直線の交点を求める関数
vector<Point> getCrossPoints(Circle c,Line l){

	vector<Point> ret;

	Vector pr = project(l,c.center);
	Vector e = (l.p[1]-l.p[0])/abs(l.p[1]-l.p[0]);

	double base;

	if(fabs(c.r*c.r-norm(pr-c.center)) < EPS){

		base = 0;
	}else{
		base = sqrt(c.r*c.r-norm(pr-c.center));
	}

	ret.push_back(Point(pr+e*base));
	ret.push_back(Point(pr-e*base));

	return ret;
}

vector<Point> getContact(Circle circle,Point point){

	double k = circle.center.x - point.x;
	double X = point.y - circle.center.y;

	double A = k*k - circle.r*circle.r;

	if(fabs(A) < EPS){

		double slope = (circle.r*circle.r-X*X)/(2*k*X);

		if(fabs(slope) < EPS){

			vector<Point> ret;

			ret.push_back(Point(point.x,sqrt(circle.r*circle.r-(point.x-circle.center.x)*(point.x-circle.center.x))+circle.center.y));
			ret.push_back(Point(sqrt(circle.r*circle.r-(point.y-circle.center.y)*(point.y-circle.center.y))+circle.center.x,point.y));

			return ret;
		}

		Line line;

		line.p[0] = point;
		line.p[1] = Point(point.x+NUM,point.y+NUM*slope);

		return getCrossPoints(circle,line);
	}

	double B = 2*k*X;
	double C = X*X - circle.r*circle.r;

	double slope_1 = (-B+sqrt(B*B-4*A*C))/(2*A);
	double slope_2 = (-B-sqrt(B*B-4*A*C))/(2*A);

	Line line_1,line_2;

	line_1.p[0] = point;
	line_1.p[1] = Point(point.x+NUM,point.y+NUM*slope_1);
	vector<Point> ret_1 = getCrossPoints(circle,line_1);

	line_2.p[0] = point;
	line_2.p[1] = Point(point.x+NUM,point.y+NUM*slope_2);

	vector<Point> ret_2 = getCrossPoints(circle,line_2);

	vector<Point> ret;

	ret.push_back(ret_1[0]);
	ret.push_back(ret_2[0]);

	return ret;
}

int main(){


	Point point;
	Circle circle;

	scanf("%lf %lf",&point.x,&point.y);
	scanf("%lf %lf %lf",&circle.center.x,&circle.center.y,&circle.r);

	vector<Point> ans = getContact(circle,point);

	if(fabs(ans[0].x-ans[1].x) > EPS){

		if(ans[0].x > ans[1].x+EPS){

			swap(ans[0],ans[1]);
		}

	}else{

		if(ans[0].y > ans[1].y+EPS){

			swap(ans[0],ans[1]);
		}
	}

	printf("%.10lf %.10lf\n",ans[0].x,ans[0].y);
	printf("%.10lf %.10lf\n",ans[1].x,ans[1].y);

	return 0;
}




Measured memory_bytes: 3208