# [POI2007]GRZ-Ridges and Valleys

## 题目描述

### 输出格式

The first and only line of the standard output should contain two integers separated by a single space -thenumber of ridges followed by the number of valleys for the landscape described by the map.

## 输入输出样例

### 输入样例 #1

5
8 8 8 7 7
7 7 8 8 7
7 7 7 7 7
7 8 8 7 8
7 8 8 8 8

### 输出样例 #1

2 1