Under construction

Still being built. Things may change

Position Zero

Interview

Time limit1sMemory limit1024 MB

Summary
Count the vertical lines x = T_i that pass strictly inside a circle with center (X, Y) and radius R, and count those that only touch its boundary.
Level

Easy1 of 10

Topics
Implementation, Math
Solved
No attempts yet

Problem

Banana is a stage girl. She wants to stand at the "Position Zero" of the stage. In this problem, the stage is a two-dimensional coordinate plane, and "Position Zero" is expressed as a circle on this plane.

The center of "Position Zero" is (X,Y)(X, Y), and its radius is RR.

However, the range where Banana can move is limited. Banana chooses one of NN straight lines and can move only along it.

Each line is expressed as x=Tix = T_{i} (1≤i≤N)(1 \leq i \leq N).

Given NN, the number of lines Banana can move along, the center coordinates XX, YY and radius RR of "Position Zero", and the information TiT_i of each line, output AA, the number of lines along which Banana can enter the inside of "Position Zero", and BB, the number of lines along which Banana can enter only the boundary of "Position Zero".

Input

The first line contains the number of lines NN along which Banana can move.

The second line contains three integers XX, YY, and RR, separated by spaces.

From the third line to the (N+2)(N + 2)-th line, the value TiT_i is given in order on the (i+2)(i + 2)-th line (1≤i≤N)(1 \leq i \leq N).

All numbers given in the input are integers.

Output

Print AA and BB, separated by a space, where AA is the number of lines along which Banana can enter the inside of "Position Zero", and BB is the number of lines along which Banana can enter only the boundary of "Position Zero".

Constraints

  • 1≤N≤1001 \leq N \leq 100
  • −100≤X,Y≤100-100 \leq X, Y \leq 100
  • 1≤R≤1001 \leq R \leq 100
  • −100≤Ti≤100-100 \leq T_{i} \leq 100 (1≤i≤N)(1 \leq i \leq N)

Examples1

  1. Example 1

    Input
    3
    1 2 2
    -1
    1
    5
    
    Expected output
    1 1