Predecimal Currency
Before decimal currency, Australia used to have a money system based on the British pounds, shilling, and pence. In this system, pennies are equivalent to a shilling, and
shillings are equal to a pound.
Given some sets of pounds,
shillings, and
pence, determine the largest number of sets of coins which have the same value.
Input
The first line consists of an integer
, the number of sets of coins.
The next lines consists of three integers
,
and
, representing the number of pounds, shillings, and pence in that set.
Output
For each test case, print the size of the largest group of coins with the same value
Example
Input
4
1 20 3
2 0 3
1 19 15
1 0 0
Output
3
The first sets of coins (
1 20 3
, 2 0 3
and 1 19 15
) have an equivalent value, creating a group of size . The last set of coins does not have any other sets of equivalent value. The largest group of coins with the same value has the size of
.
Comments