#include<stdio.h>
int main()
{
int HH=7, MM=50;
float s, v, t;
scanf("%f %f", &s, &v);
t = s / v;
if (t != 0)
MM = MM - (int)t - 1;
while (MM >= 60)
{
HH++;
MM -= 60;
}
while (MM < 0)
{
HH--;
MM += 60;
}
if (HH < 0)
{
HH = 24 + HH;
}
if (HH >= 24)
{
HH = 24 - HH;
}
if (HH < 10)
printf("0");
printf("%d:", HH);
if (MM < 10)
printf("0");
printf("%d", MM);
return 0;
}