#include <iostream>
using namespace std;
int main()
{
long long int h,m,s;
while(cin>>h>>m)
{
h=h+2;m=m+30;
if(m>=60)
{
h=m/60+h;
m=m-(m/60)*60;
}
if(h>=24)
{
h=h-(h/24)*24;
}
if(h<10)
{
cout<<"0"<<h<<":";
}
else cout<<h<<":";
if(m<10 )
{
cout<<"0"<<m;
}
else cout<<m;
}
}