/*
TASK:crossing
LANG:C++
*/
#include<iostream>
#include<cmath>
using namespace std;
double w,s,a,b;
double tw,ts;
int chas(long a1)
{
	cout<<a1/3600<<":";
	a1=a1%3600;
	cout<<a1/60<<":";
	a1=a1%60;
	cout<<a1+1;
	return 0;
}
int main()
{
	cin>>w>>s>>a>>b;
	tw=(w)/(a);
	ts=(s)/(b);
	tw=tw/0.01;
	ts=ts/0.01;
	long tw1=tw, ts1=ts;
	chas((tw1+ts1)*36);
    return 0; 
}
