CF1133A.Middle of the Contest

传统题 时间 2000 ms 内存 256 MiB 5 尝试 1 已通过 1 标签

Middle of the Contest

Polycarp is going to participate in the contest. It starts at h1:m1h_1:m_1 and ends at h2:m2h_2:m_2. It is guaranteed that the contest lasts an even number of minutes (i.e. m1%2=m2%2m_1 \% 2 = m_2 \% 2, where x%yx \% y is xx modulo yy). It is also guaranteed that the entire contest is held during a single day. And finally it is guaranteed that the contest lasts at least two minutes.

Polycarp wants to know the time of the midpoint of the contest. For example, if the contest lasts from 10:0010:00 to 11:0011:00 then the answer is 10:3010:30, if the contest lasts from 11:1011:10 to 11:1211:12 then the answer is 11:1111:11.

Input

The first line of the input contains two integers h1h_1 and m1m_1 in the format hh:mm.

The second line of the input contains two integers h2h_2 and m2m_2 in the same format (hh:mm).

It is guaranteed that 0h1,h2230 \le h_1, h_2 \le 23 and 0m1,m2590 \le m_1, m_2 \le 59.

It is guaranteed that the contest lasts an even number of minutes (i.e. m1%2=m2%2m_1 \% 2 = m_2 \% 2, where x%yx \% y is xx modulo yy). It is also guaranteed that the entire contest is held during a single day. And finally it is guaranteed that the contest lasts at least two minutes.

Output

Print two integers h3h_3 and m3m_3 (0h323,0m3590 \le h_3 \le 23, 0 \le m_3 \le 59) corresponding to the midpoint of the contest in the format hh:mm. Print each number as exactly two digits (prepend a number with leading zero if needed), separate them with ':'.

Samples

10:00
11:00
10:30
11:10
11:12
11:11
01:02
03:02
02:02

在线编程 IDE

建议全屏模式获得最佳体验