s,v = map(int,input().split())
t = s/v+10
h = t //60
f = t % 60
if f != 0:
h = int(h +1)
else :
h = int (h)
if t >= 24*60:
print('0')
elif h > 8:
h = 32 -h
if f <= int (f):
f= int(f)
else:
f= int(f+1)
if h == 24:
print('00:%d'%(60-f))
else:
print("%d:%d"%(h,(60-f)))
else:
h = 8-h
print('0%d:%d'%(h,60-f))
#3#5WA了
tips:代码有点乱因为是想到什么写什么勿怪勿怪、
不知道测试点信息、请问是哪个地方出纰漏了、
已经自己改了四遍看的脑壳痛、救救孩子叭?