#include <bits/stdc++.h>
using namespace std;
double EPS = 0.00000001;
int sign(double x){
	if (x > EPS){
		return 1;
	} else if (x < -EPS){
		return -1;
	} else {
		return 0;
	}
}
bool equals(double x, double y){
	return abs(x - y) < EPS;
}
struct point{
	double x;
	double y;
	point(){
		x = 0;
		y = 0;
	}
	point(double X, double Y){
		x = X;
		y = Y;
	}
	point operator +(){
		return point(x, y);
	}
	point operator -(){
		return point(-x, -y);
	}
	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 +=(point P){
		x += P.x;
		y += P.y;
		return *this;
	}
	point& operator -=(point P){
		x -= P.x;
		y -= P.y;
		return *this;
	}
	point operator *(double k){
		return point(x * k, y * k);
	}
	point operator /(double k){
		return point(x / k, y / k);
	}
	point& operator *=(double k){
		x *= k;
		y *= k;
		return *this;
	}
	point& operator /=(double k){
		x /= k;
		y /= k;
		return *this;
	}
	bool operator <(point P){
		return sign(P.x - x) == 1 || equals(x, P.x) && sign(P.y - y) == 1;
	}
	bool operator >(point P){
		return (P < *this);
	}
};
istream& operator >>(istream &is, point &p){
	double x, y;
	is >> x >> y;
	p = point(x, y);
	return is;
}
ostream& operator <<(ostream &os, point p){
	os << p.x << ' ' << p.y;
	return os;
}
double norm(point P){
	return P.x * P.x + P.y * P.y;
}
double abs(point P){
	return sqrt(norm(P)); 
}
point rotate90(point P){
	return point(-P.y, P.x);
}
double dist(point P, point Q){
	return abs(P - Q);
}
struct line{
	point A;
	point B;
	line(){
	}
	line(point P){
	  B = P;
	}
	line(point P, point Q){
		A = P;
		B = Q;
	}
};
using segment = line;
point vec(line L){
	return L.B - L.A;
}
point unit(line L){
	return vec(L) / abs(vec(L));
}
point norm(line L){
	return rotate90(unit(L));
}
point partition(segment S, double a, double b){
	return (S.A * b + S.B * a) / (a + b);
}
struct circle{
	point c;
	double r;
	circle(){
	}
	circle(point C, double R){
		c = C;
		r = R;
	}
};
istream& operator >>(istream &is, circle &C){
    point P;
    double r;
    cin >> P >> r;
    C = circle(P, r);
    return is;
}
int circle_pos(circle C1, circle C2){
	double d = dist(C1.c, C2.c);
	if (sign(d - (C1.r + C2.r)) == 1){
		return 4;
	} else if (sign(d - (C1.r + C2.r)) == 0){
		return 3;
	} else if (sign(d - abs(C1.r - C2.r)) == 1){
		return 2;
	} else if (sign(d - abs(C1.r - C2.r)) == 0){
		return 1;
	} else {
		return 0;
	}
}
vector<point> circle_intersection(circle C1, circle C2){
	int pos = circle_pos(C1, C2);
	vector<point> ans;
	if (pos == 4 || pos == 0){
		return ans;
	} else if (pos == 3){
		ans.push_back(partition(line(C1.c, C2.c), C1.r, C2.r));
		return ans;
	} else if (pos == 1){
		ans.push_back(partition(line(C1.c, C2.c), C1.r, -C2.r));
		return ans;
	} else {
		line L(C1.c, C2.c);
		double x = (norm(vec(L)) + pow(C1.r, 2) - pow(C2.r, 2)) / (2 * abs(vec(L)));
		double h = sqrt(max(pow(C1.r, 2) - pow(x, 2), (double) 0));
		ans.push_back(C1.c + unit(L) * x + norm(L) * h);
		ans.push_back(C1.c + unit(L) * x - norm(L) * h);
		return ans;
	}
}
int main(){
  cout << fixed << setprecision(15);
  circle C1, C2;
  cin >> C1 >> C2;
  vector<point> ans = circle_intersection(C1, C2);
  sort(ans.begin(), ans.end());
  if (ans.size() == 1){
    cout << ans[0] << ' ' << ans[0] << endl;
  } else {
    cout << ans[0] << ' ' << ans[1] << endl;
  }
}


Measured memory_bytes: 3288