#include <iostream>
#include<cmath>
using namespace std;
int main() {
int s, v;
cin >> s >> v;
double time = (s * 1.0) / (v * 1.0);
if (time - int(time) != 0) {
time = ceil(time);
}
if (time <= 60) {
cout << "07:" << 60 - time - 10;
}
else {
int h, m;
int t = time;
if (t < 480) {
t = 480 - t-10;
h = t / 60;
m = t % 60;
if (m == 0) {
cout << "0" << h << ":" << "00";
}
if (m < 10 && m != 0) {
cout << "0" << h << ":" << "0" << m;
}
if (m >= 10) {
cout << "0" << h << ":" << m;
}
return 0;
}
else {
t = 1440 - (t - 480) - 10;
h = t / 60;
m = t % 60;
if (h >= 10) {
if (m == 0) {
cout << h << ":" << "00";
}
if (m < 10 && m != 0) {
cout << h << ":" << "0" << m;
}
if (m >= 10) {
cout << h << ":" << m;
}
}
else {
if (m == 0) {
cout << "0" << h << ":" << "00";
}
if (m < 10 && m != 0) {
cout << "0" << h << ":" << "0" << m;
}
if (m >= 10) {
cout << "0" << h << ":" << m;
}
}
return 0;
}
}
return 0;
}