#include #include int main(void) { int xa, ya; int xb, yb; scanf("%d%d", &xa, &ya); scanf("%d%d", &xb, &yb); xb = -xb; if(xa - xb == 0){ printf("%f\n", (ya + yb) / 2.0); } else{ printf("%f\n", (double)abs(xa) * yb / abs(xa - xb) + (double)ya * abs(xb) / abs(xa - xb)); } return 0; }