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

using namespace std;

const __float128 PI = 3.1415926535897932384;
const __float128 EPS = 1e-9;

__float128 fabs(__float128 x)
{
	return x > 0 ? x : -x;
}

struct point
{
	__float128 x, y;
	point(__float128 x = 0.0, __float128 y = 0.0): x(x), y(y) {}
	__float128 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 __float128 & a) {return point(p.x * a, p.y * a);}

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

int main()
{
	ifstream cin("mjolnir.in");
	ofstream cout("mjolnir.out");
	__float128 s;
	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);
	__float128 d = p1.dist2(p2);
	
    long double alpha = asin((long double)(s / d));
    
    if (s > d)
    {
    	cout << "0 0\n0 0\n";
    	return 0;
    }		
    
    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 << (long double)ans1.x << " " << (long double)ans1.y << "\n";
    cout << fixed << (long double)ans2.x << " " << (long double)ans2.y << "\n";
}

