#include <bits/stdc++.h>
using namespace std;
char s1[6], s2[6];
int a, b, c, d, sum;
int main() {
  scanf("%s%s", s1, s2);
  a = (s1[0] - '0') * 10 + s1[1] - '0';
  b = (s1[3] - '0') * 10 + s1[4] - '0';
  c = (s2[0] - '0') * 10 + s2[1] - '0';
  d = (s2[3] - '0') * 10 + s2[4] - '0';
  while (1) {
    if (a == c && b == d) {
      cout << setw(2) << setfill('0') << sum / 60 << ":" << setw(2)
           << setfill('0') << sum % 60;
      return 0;
    }
    d++;
    if (d == 60) d = 0, c++;
    if (c == 24) c = 0;
    sum++;
  }
}
