#include <bits/stdc++.h>
using namespace std;
int main()
{
int s,v;
cin >> s >> v;
int tim_h = 7,tim_m = 50;
double tim = s * 1.0 / v;
int t = s*1.0/v;
int tim_h2 = tim / 60,tim_m2 = t % 60;
tim_h -= tim_h2;
if(tim_m - tim_m2 < 0)
{
tim_m += 60;
tim_h--;
}
tim_m -= tim_m2;
if(tim_h < 10) cout << "0" << tim_h << ":" << tim_m-1 << endl;
if(tim_m < 10) cout << "0" << tim_h << ":0" << tim_m-1 << endl;
return 0;
}