#include<bits/stdc++.h>
using namespace std;
int main(){
int HH=7,MM=50;
double s,v,tem;
cin>>s>>v;
tem=(int)s/v;
if(tem<s/v){
tem++;
}
MM-=tem;
while(MM<0){
HH--;
MM+=60;
if(MM<0){
MM=23;
}
}
cout<<setw(2)<<setfill('0')<<HH<<':'<<setw(2)<<setfill('0')<<MM;
return 0;
}