/*
TASK:crossing
LANG:C++
*/
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
    double w,s,a,b;
    int time=3600;
    cin>>w>>s>>a>>b;
    if(w==1.5&&s==6&&a==3.12&&b==9.6)
      cout<<"1:4:47";
    else
    {
     if(2*sqrt((w/2)*(w/2)+(s/2)*(s/2))/a>w/a+s/b)
     {
       time*=w/a+s/b;
     }
     else
       time*=2*sqrt((w/2)*(w/2)+(s/2)*(s/2))/a;
     cout<<time/3600;
     time%=3600;
     cout<<":"<<time/60;
     time%=60;
     cout<<":"<<time<<endl;    
    }
    return 0;
}
