#B3698. Count Points on a Line

    ID: 11357 Type: Default 1000ms 256MiB

Count Points on a Line

Count Points on a Line

In the two-dimensional coordinate system, a point's location is expressed as \( (x, y) \). A line representing a linear function is given by the equation \( y=kx+b \). You are provided with \( n \) points, where the \( i\text{-th} \) point is represented by coordinates \( (x_i, y_i) \).

Your task is to count how many of these points lie exactly on the line represented by the linear function \( y=kx+b \). In other words, a point \( (x, y) \) is considered to be on the line if and only if the equality \( y=kx+b \) holds true.

inputFormat

The first line contains three integers \( n \), \( k \), and \( b \) separated by spaces, where \( n \) is the number of points, and \( k \) and \( b \) are the parameters of the linear function.

The following \( n \) lines each contain two integers \( x \) and \( y \) representing the coordinates of a point.

outputFormat

Output a single integer which represents the number of points that lie on the line \( y=kx+b \).

sample

5 2 1
0 1
1 3
2 4
3 7
4 9
4

</p>