#include<iostream>
#include<iomanip>
#include<math.h>
using namespace std;
int main()
{
double s, v, t;
cin >> s >> v;
int H, num;
t = s / v + 10;
H = 7;
num = t / 60;
if (num)
{
H -= num;
t -= 60 * num;
}
cout << setw(2) << setfill('0') << H << ":" << setw(2) << setfill('0') << 60 - ceil(t);
return 0;
}