#include<stdio.h> int main() { int s,v,t,h,m; scanf("%d %d",&s,&v); t=60*8-(s/v+10); if(s%v!=0) t-=1; if(t>60*8) t+=60*24; h=t/60; m=t%60; if(h<10) printf("0%d",h); else printf("%d",h); printf(":"); if(m<10) printf("0%d",m); else printf("%d",m); }