a,b=map(int,input().split()) c=a//b+11 #总耗时(向下取整所以+1) o2=str(60-c%60) o1='0'+str(7-c//60) print(o1+':'+o2)