import java.util.*; public class EuclidTake2 { public static void main(String[] args) { Scanner in = new Scanner(System.in); while (go(in)) ; } static boolean go(Scanner in) { pPnt a = new pPnt(in.nextDouble(), in.nextDouble()); pPnt b = new pPnt(in.nextDouble(), in.nextDouble()); pPnt c = new pPnt(in.nextDouble(), in.nextDouble()); pPnt d = new pPnt(in.nextDouble(), in.nextDouble()); pPnt e = new pPnt(in.nextDouble(), in.nextDouble()); pPnt f = new pPnt(in.nextDouble(), in.nextDouble()); if(a.x == 0 && a.y == 0 && b.x == 0 && b.y == 0) return false; pVec AB = new pVec(a, b); pVec AC = new pVec(a, c); pVec DE = new pVec(d, e); pVec DF = new pVec(d, f); double area = 0.5 * DE.area(DF); double alt = area / AB.dist(); double thetaCAB = AC.theta() - AB.theta(); double proj = alt / Math.sin(thetaCAB); double pC = proj / AC.dist(); pC = Math.abs(pC); pPnt h = new pPnt(a.x, a.y); h.x += AC.dx() * pC; h.y += AC.dy() * pC; pPnt g = new pPnt(b.x + h.x - a.x, b.y + h.y - a.y); String s = String.format("%1.3f %1.3f %1.3f %1.3f", g.x, g.y, h.x, h.y); System.out.println(s); return true; } static double dist(double x1, double y1, double x2, double y2) { double dx = x1 - x2; double dy = y1 - y2; return Math.sqrt(dx * dx + dy + dy); } static class pPnt { public double x; public double y; public pPnt(double _x, double _y) { x = _x; y = _y; } public String toString() { return String.format("%1.3f, % 1.3f", x, y); } } static class pVec { public pPnt one; public pPnt two; public pVec(pPnt _one, pPnt _two) { one = _one; two = _two; } public double dist() { return Math.sqrt(dx() * dx() + dy() * dy()); } public double theta() { return Math.atan2(dy(), dx()); } public double dx() { return -one.x + two.x; } public double dy() { return -one.y + two.y; } public double area(pVec other) { double out = dx() * other.dy() - dy() * other.dx(); return Math.abs(out); } public String toString() { return String.format("%1.3f, %1.3f", dx(), dy()); } } }