EasyRating 1000
Best Pair of Teammates
Each person knows some topics, written as a string of 0s and 1s. A pair of people knows a topic if at least one of them knows it. Print the most topics any pair knows, and how many pairs know that many.
Input
n, then n binary strings of the same length.
Output
Two integers.
Sample 1
Input
4 10101 11100 11010 00101
Output
5 2
Sample 2
Input
2 00 00
Output
0 1
Output appears here