A detecting device compares the size of components produced by a machine against the reference component.
If the size of the component is larger, it can be fixed; the detector prints 1.
If the size of the component is smaller, it is deemed as a rejection; the detector prints -1.
If the component is perfect, it is sent to the box; the detector prints 0.
Write a program which takes n (the number of parts) as input and then the detector sequence. The program should output three numbers in a single line — the number of perfect components, the number of larger components, and the number of rejections.