Under construction

Still being built. Things may change

Find the Zebra!

Interview

Time limit0.5sMemory limit1024 MB

Summary
Count the runs of 1s in each zebra's coat string, then print the maximum run count and how many zebras reach it.
Level

Easy2 of 10

Topics
String, Implementation
Solved
No attempts yet

Statement

A safari tour guest named Geondeok was interested in zebras. He thought a zebra was more beautiful when its body had more black stripes.

Geondeok records the coat of each zebra with 0 and 1. 0 marks a white part of the coat, and 1 marks a black part.

The number of black stripes is the number of consecutive black parts. For example, if Geondeok records a zebra's coat as 01101110101, this zebra has 44 black stripes.

Input

The first line contains the number of zebras NN and the body length LL, separated by a space. (1≤N,L≤1 0001\leq N,L\leq 1\,000)

Each of the next NN lines contains a string of length LL that describes one zebra's coat as recorded by Geondeok. Each string consists only of 0 and 1.

Output

Print the number of black stripes of the most beautiful zebra in Geondeok's opinion, and the number of zebras that have that many stripes, separated by a space.

Examples1

  1. Example 1

    Input
    5 9
    110010101
    101010100
    000011111
    011011010
    100100101
    
    Expected output
    4 3