Ancient Basketball Match
In Byteland, archaeologists have uncovered clay tablets detailing the events of the country's first basketball match. This significant historical find has prompted a desire to reconstruct the match's final score.
From other sources, we know that the scoring rules in ancient Byteland basketball were similar to those of modern basketball:
A successful free throw earns the team 1 point.
A successful close-range shot earns the team 2 points.
A successful long-range shot earns the team 3 points.
It is also known that a shot is considered close if the distance to the basket is no more than L; otherwise, it is considered long.
Given the data on successful shots, archaeologists need your help to reconstruct the match's final score.
Input
The first line of input contains two integers n (1 ≤ n ≤ 1000) and L (1 ≤ L ≤ 30), representing the number of records on the tablets about successful shots and the boundary separating two- and three-point shots, respectively.
The following n lines provide information about the successful shots. Each line contains two integers t_i (1 ≤ t_i ≤ 2) and d_i (-1 ≤ d_i ≤ 50). If d_i ≥ 0, it indicates that a player from team t_i made a successful shot from a distance of d_i. If d_i = -1, it indicates that a player from team t_i made a successful free throw.
Output
Output the match result in a single line: the number of points scored by the first and second teams, separated by a colon.