Ricefield
Once, traveling in fairyland, the Rabbit in one of the valleys he saw a rice field. Field occupies the whole valley, which is a rectangle M×N cells. The Rabbit was very impressed by such a complex device that field. It consisted of individual plots, each plot was located at his level. Since the size of the field is very large, the Rabbit asks you to help him find the portions of the field with the largest and the smallest area.
![](https://static.e-olymp.com/content/70/702bf5f0bd99d24c712db6138d98454e639989bd.jpg)
Input
The first line of the input file two numbers M and N (1 ≤ M, N ≤ 100). The following M lines of N numbers each separated by a space, followed by a description card. Each cell contains a map integers p_i (0 ≤ p_i < 100), which indicate at what level is the site. The site is a collection of cells of the field, which are located on one level, and have with other cells of the same level of overall direction.
Output
Derive a space two numbers: the maximum and minimum land area.