#include <bits/stdc++.h>
using namespace std;
int main() {
  int hou, min, sec;
  while (scanf("%d %d %d", &hou, &min, &sec), hou != -1) {
    if (sec != 0) {
      sec = 60 - sec;
    }
    if (min != 0) {
      min = 60 - min;
    }
    hou = 1 - hou;
    printf("0%d:", hou);
    if (min < 10) {
      printf("0");
    }
    printf("%d:", min);
    if (sec < 10) {
      printf("0");
    }
    printf("%d\n", sec);
    sec *= 3;
    min *= 3;
    while (sec > 59) {
      sec -= 60;
      min++;
    }
    while (min > 59) {
      min -= 60;
      hou++;
    }
    printf("0%d:", hou);
    if (min < 10) {
      printf("0");
    }
    printf("%d:", min);
    if (sec < 10) {
      printf("0");
    }
    printf("%d\n", sec);
  }
  return (0);
}
