Predecimal Currency


Submit solution

Points: 1
Time limit: 0.1s
Memory limit: 10M
Python 3 20M

Author:
Problem type
Allowed languages
C++, Java, Python

Before decimal currency, Australia used to have a money system based on the British pounds, shilling, and pence. In this system, 12 pennies are equivalent to a shilling, and 20 shillings are equal to a pound.

Given some sets of p pounds, s shillings, and c pence, determine the largest number of sets of coins which have the same value.

Input

The first line consists of an integer n (1 \leq n \leq 100), the number of sets of coins.

The next n lines consists of three integers p, s and c (0 \leq p, s, c \leq 10^5), 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 3 sets of coins (1 20 3, 2 0 3 and 1 19 15) have an equivalent value, creating a group of size 3. 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 3.


Comments

There are no comments at the moment.