#include<bits/stdc++.h> using namespace std; int s,v; int main() { cin>>s>>v; int t=0; if(s%v==0){ t=s/v; }else{ t=s/v+1; } t+=10; int h=t/60; int m=t%60; int h1=7; int m1=60-m; if(h<=7){ h1-=h; }else{ h1=19-h; } cout<<h1<<":"<<m1; return 0; }