#include <fstream>
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>

using namespace std;

const long double PI = 3.1415926535897932384;
const long double EPS = 1e-9;

struct point
{
	long double x, y;
	point(long double x = 0.0, long double y = 0.0): x(x), y(y) {}
	long double dist2(const point & p) {return (x - p.x) * (x - p.x) + (y - p.y) * (y - p.y);}
    bool operator<(const point & p) const
	{
		return (x < p.x - EPS) || ((fabs(x - p.x) < EPS) && (y < p.y - EPS));
	}
};

point operator-(const point & p1, const point & p2) {return point(p1.x - p2.x, p1.y - p2.y);}
point operator+(const point & p1, const point & p2) {return point(p1.x + p2.x, p1.y + p2.y);}
point operator*(const point & p, const long double & a) {return point(p.x * a, p.y * a);}

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

int main()
{
	ifstream cin("mjolnir.in");
	ofstream cout("mjolnir.out");
	long double s;
	cin >> s;
	s = 2 * s;
		
	cout.precision(20);

	long double x1, x2, y1, y2;
	cin >> x1 >> y1 >> x2 >> y2;
	point p1 = point(x1, y1);
	point p2 = point(x2, y2);
	long double d = p1.dist2(p2);
	    
    if (s > d)
    {
    	cout << "0 0\n0 0\n";
    	return 0;
    }		
    
    long double l = 0, r = PI / 2;
    for (int iter = 0; iter < 200; iter++)
    {
    	long double m = (l + r) / 2;
    	if ((s - sin(m) * d) > 0) l = m; else r = m;
    }

    long double alpha = l;
    point centr = p1 + (p2 - p1) * 0.5;
        
	point ans1 = centr + rotate((p2 - p1) * 0.5, alpha);
    point ans2 = centr + rotate((p2 - p1) * 0.5, PI + alpha);
    if (ans2 < ans1) swap(ans1, ans2);
    cout << fixed << ans1.x << " " << ans1.y << "\n";
    cout << fixed << ans2.x << " " << ans2.y << "\n";
}

