#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
int s, v, spendhour = 0, totalminute = 0, spendminute,minute=0, roalhour = 8, starthour = 0,roalminute=60;
scanf("%d %d", &s, &v);
totalminute = s / v + 10;
if (s / (double)v != 0)
totalminute += 1;
spendhour = totalminute / 60;
spendminute = totalminute % 60;
if (spendhour > roalhour && spendhour < 24) {
starthour = 24 - (spendhour - roalhour);
}
else
{
starthour = roalhour - spendhour-1;
}
if (spendhour >= 24)
{
printf("false");
return 0;
}
minute = roalminute - spendminute;
if (starthour < 10)
{
printf("%02d:%02d\n", starthour, minute);
}
else
{
printf("%d:%2d\n", starthour, minute);
}
return 0;
}