/*
TASK:crossing
LANG:C++
*/
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
    double w,s,a,b,sb=0,sb2=0;    
    //int f;    
    cin>>w>>s>>a>>b;
    //cout<<w/a<<" "<<s/b<<" "<<w/a+s/b<<endl;             
    sb=w/a+s/b;  
    sb2=floor(sb);
    //cout<<sb2<<endl;
    if(sb2>=1)
    cout<<sb2;
    sb=(sb-sb2)*60;
    sb2=floor(sb);
    if(sb2>=1)
    cout<<":"<<sb2;
    sb=(sb-sb2)*60;
    sb2=floor(sb);
    if(sb2>=1)
    cout<<":"<<sb2<<endl;
    
return 0;
}
