The locations of Farmer John's cows are given by distinct points in the 2D plane. The cows belong to one of two breeds: Holsteins and Guernseys.
Farmer John wants to build a rectangular fence with sides parallel to the coordinate axes that encloses only Holsteins and no Guernseys. A cow is considered enclosed even if it lies on the boundary of the fence.
Among all such fences, Farmer John wants to build one that encloses the maximum possible number of Holsteins. Among all fences that enclose this maximum number of Holsteins, he wants to find one with the minimum possible area.
Please determine both the maximum number of Holsteins that can be enclosed and the minimum area of a fence achieving this maximum.
A fence with zero width or zero height is allowed.
The first line contains an integer n~(1 \le n \le 500). Each of the following lines describes one cow and contains two integers and a character. The integers specify the coordinates of the cow, where 0 \le x, y \le 1000. The character is either or , indicating the cow's breed.
No two cows are located at the same point, and there is guaranteed to be at least one Holstein.
Print two integers. The first line should contain the maximum number of Holsteins that can be enclosed by a fence containing no Guernseys. The second line should contain the minimum area of a fence that encloses this maximum number of Holsteins.
Example 1