#abc248e. [abc248_e]K-colinear Line
[abc248_e]K-colinear Line
Problem Statement
You are given points in the coordinate plane. For each , the -th point is at the coordinates .
Find the number of lines in the plane that pass or more of the points.
If there are infinitely many such lines, print Infinity
.
Constraints
- $\\lvert X_i \\rvert, \\lvert Y_i \\rvert \\leq 10^9$
- or , if .
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the number of lines in the plane that pass or more of the points, or Infinity
if there are infinitely many such lines.
Sample Input 1
5 2
0 0
1 0
0 1
-1 0
0 -1
Sample Output 1
6
The six lines , , , and satisfy the requirement.
For example, passes the first, third, and fifth points.
Thus, should be printed.
Sample Input 2
1 1
0 0
Sample Output 2
Infinity
Infinitely many lines pass the origin.
Thus, Infinity
should be printed.