#include<bits/stdc++.h> using namespace std; int main(){ int s,v,t,h,m,e,f; cin>>s>>v; t=s/v+11; h=t/60; m=t%60; e=7-h; f=60-m; if (e<0){ e=24+e; } printf("%02d",e); cout<<":"; printf("%02d",f); return 0; }