#include <iostream>
using namespace std;
int main()
{
double s, v;
cin >> s >> v;
if (s >= 1 && v <= 1e4)
{
double time;
int time2;
time = s / v + 10;
time2 = 8 * 60 - time;
int HH, MM;
HH = time2 / 60;
MM = time2 % 60;
printf("%02d:%02d", HH, MM);
}
system("pause");
return 0;
}