#include<bits/stdc++.h> using namespace std; int main(){ double a,b,c,d,x,y; cin>>a>>b>>c>>d; x=a*b+c*d; y=x/(b+d); cout<<x<<endl; cout<<y; }