There is n Imperial Stormtroopers on the field. The battle field is a plane with Cartesian coordinate system. Each stormtrooper are associated with the coordinates (x, y) on the this plane.
Han Solo has the newest duplex lazer gun to fight these stormtroopers. It is situated at the point (x0, y0). In one shot it can destroy all the stormtroopers, situated on some line that crosses point (x0, C13>y0).
Your task is to determine what minimum number of shots Han Solo needs to defeat all the Stormtroopers.
The gun is the newest invention, it shoots very quickly and even after a very large number of shots the Stormtroopers don ' T has enough time to realize what's happening and change their location.
Input
The first line contains three integers n, x0и y0 (1≤ n ≤100 0, -4≤ x0, y0≤104)-the number of Stormtroopers on the battle field and the coordinates of your gun.
Next n lines contain II integers each xi, yi ( -1 04≤ xi, yi ≤104)-the coordinates of the Stormtroopers On the battlefield. It is guaranteed this no Stormtrooper stands at the same point with the gun. Multiple Stormtroopers can stand at the same point.
Output
Print a single integer-the minimum number of shots Han Solo needs to destroy all the Stormtroopers.
Sample Test (s) input
4 0 0
1 1
2 2
2 0
-1-1
Output
2
Input
2 1 2
1 1
1 0
Output
1
Note
Explanation to the first and second samples from the statement, respectively:
Aim point at x, y there are n individuals, connected together, a shot, set new skills get~
#include <cstdio>#include<Set>using namespacestd;Set<Double>se;intMain () {intN,x,y,x1,y1,flag =0; scanf ("%d%d%d",&n,&x,&y); for(inti =1; I <= N; i++) {scanf ("%d%d",&x1,&y1); if(y = = y1) flag =1; ElseSe.insert ((Double) (x-x1)/(Yy1)); } printf ("%d\n", Se.size () +flag);}
View Code
Codeforces Round #291 (Div. 2)--b<set>--han Solo and Lazer Gun