#include <bits/stdc++.h>
int main(void) {
  int t1, m, s;
  int tn, mn, sn;
  int i;
  while (1) {
    for (i = 0; i < 2; i++) {
      if (i == 0) {
        scanf("%d %d %d", &tn, &mn, &sn);
      }
      t1 = 2;
      m = 0;
      s = 0;
      if (tn == -1 && mn == -1 && sn == -1) {
        break;
      }
      if (i == 1) {
        sn += (tn * 3600 + mn * 60) / 3;
        mn = sn / 60;
        sn = sn % 60;
        tn = mn / 60;
        mn = mn % 60;
      }
      if (sn > 0) {
        m -= 1;
        s = 60 - sn;
      }
      if (mn > 0) {
        t1 -= 1;
        m += 60 - mn;
      }
      t1 -= tn;
      printf("0%d:", t1);
      if (m < 10) {
        printf("0%d:", m);
      } else {
        printf("%d:", m);
      }
      if (s < 10) {
        printf("0%d\n", s);
      } else {
        printf("%d\n", s);
      }
    }
    if (tn == -1 && mn == -1 && sn == -1) {
      break;
    }
  }
  return (0);
}
