#include<stdio.h> int main() { int s,v,t,a,b; scanf("%d %d",&s,&v); t=(600+s/v+59)/60; a=7-t/60; b=60-t%60; printf("%d:%d",a,b); return 0; }