Chupacabras vs mothmen
The arena is a square field with N×N cells. Chupacabras and mothmen are positioned on the grid. Each of the chupacabras and mothmen has "power" defined by a nonnegative integer; the chupacabras have even power numbers and the mothmen have odd numbers. Chupacabras always move from right to left, and mothmen always move from left to right. When a chupacabra collides with a mothman, the stronger one wins, and the weaker one disappears from the arena.
A chupacabra cannot jump over or step on another chupacabra; the same goes for two mothmen. Define how many chupacabras and mothmen will remain on the arena when no further motion is possible.
Input
The first line of the input file contains a single integer N (1 ≤ N ≤ 100).
The following N lines each contain N numbers separated by spaces. The j-th symbol of the i-th line denotes the "power" of a chupacabra or a mothman situated in the cell with the coordinates (i, j), or equals -1 if the cell is empty. The values of numbers denoting power are equal or lower than 100.
Output
The output file must contain two numbers separated by a space — the number of the remaining chupacabras and mothmen, correspondingly.