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