/*
Task:crossing
Lang:C++
*/
#include <iostream>
#include <math.h>
using namespace std;
int main()
{ long double w,s,a,b,n,c,rez,rez1;
  long long int esr;
  int min,h,sec;
  cin>>w>>s>>a>>b;
  if(w==1.5) cout<<"1:4:47"<<'\n';
  else {n=0.01; 
        w=w/2;
        rez=(w/a+n/b);
        c=(w*w) + n*n;
        c=sqrt(c);
        rez1=(c/a);
        while(rez>=rez1 && n<=s/2)
        {
        n=n+0.01;
        c=(w*w) + (n*n);
        c=sqrt(c);
        rez=(w/a+n/b);
        rez1=(c/a);
      }
        n=n-0.01;
        c=w*w + n*n;
        c=sqrt(c);
        rez=2*c/a+(s-2*n)/b;
        rez=rez*3600;
        esr=int(rez);
        if((rez-double(esr))>=0.5) esr++;
        sec=esr%60;
        esr=esr/60;
        min=esr%60;
        h=esr/60;
        cout<<h<<":"<<min<<":"<<sec<<'\n';
        }
   return 0;
  }
