#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main()
{
double s, v;
cin >> s >> v;
double t = (s / v) + 11;
double h = 8, m = 60;
if ((t / 60) <= 8)
{
if (h - (int)(t / 60) != 0)
{
if ((int)t % 60 != 0 && (m - (int)t % 60) >= 10)
{
cout << "0" << (int)(h - t / 60) << ":" << m - (int)t % 60;
}
else if ((m - (int)t % 60) < 10)
{
cout << "0" << (int)(h - t / 60) << ":0" << m - (int)t % 60;
}
else if ((int)t % 60 == 0)
{
cout << "0" << (int)(h - t / 60) << ":00";
}
}
else
{
if ((int)t % 60 != 0 && (m - (int)t % 60) >= 10)
{
cout << "00:" << m - (int)t % 60;
}
else if ((m - (int)t % 60) < 10)
{
cout << "00:0" << m - (int)t % 60;
}
else if ((int)t % 60 == 0)
{
cout << "24:00";
}
}
}
else if ((t / 60) > 8)
{
h = 24;
if ((t / 60) <= 22)
if ((int)t % 60 != 0 && (m - (int)t % 60) >= 10)
{
cout << (int)(h - t / 60 + 8) << ":" << m - (int)t % 60;
}
else if ((m - (int)t % 60) < 10)
{
cout << (int)(h - t / 60 + 8) << ":0" << m - (int)t % 60;
}
else if ((int)t % 60 == 0)
{
cout << (int)(h - t / 60 + 8) << ":00";
}
else if ((t / 60) > 22)
if ((int)t % 60 != 0&& (m - (int)t % 60) >= 10)
{
cout << "0" << (int)(h - t / 60 + 8) << ":" << m - (int)t % 60;
}
else if ((m - (int)t % 60) < 10)
{
cout << "0" << (int)(h - t / 60 + 8) << ":0" << m - (int)t % 60;
}
else if ((int)t % 60 == 0)
{
cout << "0" << (int)(h - t / 60 + 8) << ":00";
}
}
}