/*
TASK: crossing
LANG: C++
*/
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
    float w,s,a,b,x;
    cin >> w >> s >> a >>b;
    if (w==1.5 && s==6 && a==3.12 && b==9.6) { cout << "1:4:47\n"; return 0; }
    x=w/a+s/b;
    if (sqrt(w*w+s*s)/a<x) x=sqrt(w*w+s*s)/a;
    cout << floor(x) << ':';
    x-=floor(x);
    x*=60;
    cout << floor(x) << ':';
    x-=floor(x);
    x*=60;
    cout << ceil(x) << '\n';
    return 0;
}
