#include<iostream>
#include <iomanip>
#include <cstdio>
#include<string>
#include<vector>
#include<array>
#include<math.h>
#include<algorithm>
using namespace std;
int main()
{
int a, b;
int h, m, s;
cin >> a >> b;
double c;
c = (b - a * 1.00) / 100;
h = c / 3600;
m = ((c - h * 3600) / 60);
s = round(c - h * 3600 - m * 60);
if (s == 60)
{
m++;
s = 0;
}
if (m == 60)
{
h++;
m = 0;
}
printf("%02d:%02d:%02d", h, m, s);
return 0;
}