#include <stdio.h>
int main()
{
int a,b,t,m,n;
while(scanf("%d %d",&a,&b)!=EOF)
{
t=a+2;
m=b+30;
if(m>=60)
{
t=t+1;
m=m-60;
}
if(t>=24 && m==0)
{
n=t-24;
printf("0%d:00\n",n);
}
else if(t>=24)
{
n=t-24;
printf("0%d:%d\n",n,m);
}
else
printf("%d:%d\n",t,m);
}
}