/*
TASK:crossing
LANG:C++
*/
#include<math.h>
#include<iostream>
using namespace std;
int main()
{
    double w,s,a,b,x,i,y,t;
    int o;
    cin>>w>>s>>a>>b;
    w/=2;
    s/=2;
    
    for (x=s;x>w+0.01;x-=0.01)
        {
        if((w/a+x/b)>=(sqrt(w*w+x*x)/a))break;
        }
    
    y=sqrt(w*w+x*x);
    t=(y/a+(s-x)/b)*2;
    t*=3600;
    o=(int)t;
    cout<<o/3600<<":";
    o%=3600;
    cout<<o/60<<":";
    o%=60;
    cout<<o;
   // cout<<endl<<x;
 //   system("pause");
    return 0;
}
    
    
    
