import java.util.Scanner; public class euclid { static Scanner in=new Scanner(System.in); public static void main(String[] args) { double xa,ya,xb,yb,xc,yc,xd,yd,xe,ye,xf,yf; boolean notZero; do{ notZero = false; xa = in.nextDouble(); if (xa!=0) notZero =true; ya = in.nextDouble(); if (ya!=0) notZero =true; xb = in.nextDouble(); if (xb!=0) notZero =true; yb = in.nextDouble(); if (yb!=0) notZero =true; xc = in.nextDouble(); if (xc!=0) notZero =true; yc = in.nextDouble(); if (yc!=0) notZero =true; xd = in.nextDouble(); if (xd!=0) notZero =true; yd = in.nextDouble(); if (yd!=0) notZero =true; xe = in.nextDouble(); if (xe!=0) notZero =true; ye = in.nextDouble(); if (ye!=0) notZero =true; xf = in.nextDouble(); if (xf!=0) notZero =true; yf = in.nextDouble(); if (yf!=0) notZero =true; if (notZero){ double areaABC = Math.abs(xb*yc - xc*yb + xc*ya - xa*yc + xa*yb - xb*ya)/2; double areaDEF = Math.abs(xe*yf - xf*ye + xf*yd - xd*yf + xd*ye - xe*yd )/2; double k = areaDEF/(2*areaABC); double xh = k*xc + (1-k)*xa; double yh = k*yc + (1-k)*ya; double xg = xh + xb - xa; double yg = yh + yb - ya; //double xgRound = (double) Math.round(xg * 1000) / 1000; System.out.printf("%.3f ",xg); //System.out.print(xgRound+" "); System.out.printf("%.3f ",yg); System.out.printf("%.3f ",xh); System.out.printf("%.3f\n",yh); } }while(notZero); } }