#include <cstdio>
#include <iostream>
#include <cassert>
#include <cmath>
#include <vector>

using namespace std;

const long double eps = 1e-10;

struct Point
{
    long double x, y;
	Point(): x(0), y(0) {};
	Point(long double x_, long double y_): x(x_), y(y_) {};
};

long double rast(Point a, Point b)
{
    return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));  
};

int main()
{
    freopen("sword.in", "r", stdin);
    freopen("sword.out", "w", stdout);
    vector<Point> A(2);
    vector<Point> B(2);
    long double x, y;
    
    cin >> x >> y;
    A[0] = Point(x, y);
    cin >> x >> y;
    A[1] = Point(x, y);
    cin >> x >> y;
    B[0] = Point(x, y);
    cin >> x >> y;
    B[1] = Point(x, y);
    assert(rast(A[0], A[1]) > eps);
    assert(fabs(rast(A[0], A[1]) - rast(B[0], B[1])) < eps); 
    
    long double len = rast(A[0], A[1]);
    long long tek = 0;
    long long ans = (long long)(1e18);
    int rx = 0 , ry = 0;
    for (int i = 0; i < 2; i++)
        for (int j = 0; j < 2; j++)
        {
            tek = (long long)ceil(rast(A[i], B[j]) / len - eps) + 1;
			if (tek == 1 && (long long)ceil(rast(A[1 - i], B[1 - j]) / len - eps) == 0) tek = 0;
            if (ans > tek)
            {
                ans = tek;
                rx = i; ry = j;
            }
            ans = min(ans, tek);
        }
	cout.precision(20);
	if (ans == 0)
	{
		cout << A[1].x << " " << A[1].y << " " << A[0].x << " " << A[0].y << endl;
		return 0;
	}
	bool f = true;
	if ((ans - 1) == (long long)floor(rast(A[rx], B[ry]) / len + eps)) 	f =  false;

	long double dx = (A[rx].x - B[ry].x) * (len / rast(A[rx], B[ry])); 
	long double dy = (A[rx].y - B[ry].y) * (len / rast(A[rx], B[ry]));
	
	Point N;
	Point K = B[ry];
	cout << B[1].x << " " << B[1].y << " " << B[0].x << " " << B[0].y << endl;
	for (int i = 0; i < (ans - 1 - (int)(f)); i++)
	{
		N = Point(B[ry].x + dx * i, B[ry].y + dy * i);
		K = Point(B[ry].x + dx * (i + 1),  B[ry].y + dy *(1 + i)); 
		cout << N.x << " "<< N.y << " " << K.x << " " << K.y << " " << endl;
	}
	
	if (f) 
	{
		long double os = rast(A[rx], K) / len; 
		long double h = sqrt(4 - os * os) /2;
		long double x = (A[rx].x + K.x) / 2 - h * dy;
		long double y = (A[rx].y + K.y) / 2 + h * dx;
		cout << K.x << " " << K.y << " " << x << " " << y << endl;
		cout << x << " " << y << " " << A[rx].x << " " << A[rx].y << endl;
	};
    
	cout << A[1].x << " " << A[1].y << " " << A[0].x << " " << A[0].y << endl;
};