#include<bits/stdc++.h> using namespace std; int main() { int s=0,v=0,cost=0,h=0,m=0; scanf("%d%d",&s,&v); cost=ceil(s*1.0/v)+10; if(cost>=24*60) cost%=24*60; h=7-cost/60; m=60-cost%60; printf("%02d:%02d",h,m); return 0; }