#define CPP17 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef CPP17 #include #endif // Yay!! #define endl codeforces // macros for iterator #define ALL(v) std::begin(v), std::end(v) #define ALLR(v) std::rbegin(v), std::rend(v) // alias using ll = std::int64_t; using ull = std::uint64_t; using pii = std::pair; using tii = std::tuple; using pll = std::pair; using tll = std::tuple; template using vec = std::vector; template using vvec = vec>; // variadic min/max template const T& var_min(const T &t) { return t; } template const T& var_max(const T &t) { return t; } template const T& var_min(const T &t, const Tail&... tail) { return std::min(t, var_min(tail...)); } template const T& var_max(const T &t, const Tail&... tail) { return std::max(t, var_max(tail...)); } // variadic chmin/chmax template void chmin(T &t, const Tail&... tail) { t = var_min(t, tail...); } template void chmax(T &t, const Tail&... tail) { t = var_max(t, tail...); } // multi demension array template struct multi_dim_array { using type = std::array::type, Head>; }; template struct multi_dim_array { using type = std::array; }; template using mdarray = typename multi_dim_array::type; #ifdef CPP17 // fill container template void fill_seq(T &t, F f, Args... args) { if constexpr (std::is_invocable::value) { t = f(args...); } else { for (ssize_t i = 0; i < t.size(); i++) fill_seq(t[i], f, args..., i); } } #endif // make multi dimension vector template vec make_v(ssize_t sz) { return vec(sz); } template auto make_v(ssize_t hs, Tail&&... ts) { auto v = std::move(make_v(std::forward(ts)...)); return vec(hs, v); } // init namespace init__ { struct InitIO { InitIO() { std::cin.tie(nullptr); std::ios_base::sync_with_stdio(false); std::cout << std::fixed << std::setprecision(30); } } init_io; } int main() { ll a, b, c, d; std::cin >> a >> b >> c >> d; ll s = 2, t = a - c, u = b - d; ll D = t * t - 4 * s * u; auto f = [&](double x) { return x * x + a * x + b; }; if (0 < D) { auto sd = std::sqrt(D); double x1 = (-t - sd) / (2 * s); double x2 = (-t + sd) / (2 * s); double y1 = f(x1), y2 = f(x2); double coef = (y1 - y2) / (x1 - x2); double cnst = y1 - coef * x1; // y1 = coef * x1 + cnst std::cout << coef << " " << cnst << "\n"; } else if (D == 0) { std::cout << "Yes\n"; } else { std::cout << "No\n"; } return 0; }