Bob the farmer is harvesting potatoes from his long field of length N, filled with potatoes and carrots. Unfortunately, some pesky weeds have also grown in the field. Bob wants to harvest as many crops in a row, without harvesting any weeds. Can you output the number of potatoes and carrots he will harvest?
If there are multiple answers, output the one earliest in the input.
Input Specification
The first line will contain one integer, , the length of Bob's field.
The next line will contain one string, containing characters p
, c
, or w
, representing potatoes, carrots, and weeds, respectively.
Output Specification
Output the number of potatoes and carrots Bob will harvest, respectively, on one line separated by a space.
Sample Input 1
8
pccwpccc
Sample Output 1
1 3
Sample Input 2
9
wcccwwppc
Sample Output 2
0 3
Comments