#include <cstdio>

int readTime()
{
  int h, m;
  scanf("%d:%d", &h, &m);
  return h * 60 + m;
}

int main()
{
  freopen("precise.in", "r", stdin);
  freopen("precise.out", "w", stdout);

  int a = readTime();
  int b = readTime();
  int c = readTime();
  int d = readTime();
  int delta = ((b - a) - (d - c)) / 2;
  int time = d + delta;
  int M = 12 * 60;

  while (time - M >= c)
    time -= M;
  while (time < c)
    time += M;

  printf("%02d:%02d\n", time / 60, time % 60);
  return 0;
}