/*
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(2*sqrt((w/2)*(w/2)+(s/2)*(s/2))/a>w/a+s/b)
    {
      time*=w/a+s/b;
      cout<<"1"<<endl;
    }
    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;
}
