1 #include<iostream>
2 #include<string>
3 #include<algorithm>
4 #include<cstdio>
5 #include<cstring>
6 #include<cstdlib>
7 #include<cmath>
8 using namespace std;
9 typedef long long s64;
10
11 const int ONE = 1000001;
12 const int INF = 2147483640;
13
14 int n,m;
15 double x,y;
16 int Ans,record;
17
18 struct power
19 {
20 double x,y,c;
21 bool PD;
22 }a[ONE],b[ONE];
23
24 bool cmp_min(const power &a,const power &b)
25 {
26 if(a.c != b.c) return a.c < b.c;
27 return a.PD < b.PD;
28 }
29
30 inline int get()
31 {
32 int res=1,Q=1; char c;
33 while( (c=getchar())<48 || c>57)
34 if(c==‘-‘)Q=-1;
35 if(Q) res=c-48;
36 while((c=getchar())>=48 && c<=57)
37 res=res*10+c-48;
38 return res*Q;
39 }
40
41 void Deal()
42 {
43 int num=0;
44 for(int i=1;i<=n;i++)
45 if(a[i].PD==0 && a[i].c<0) num++;
46 for(int i=1;i<=n;i++)
47 if(a[i].PD==1 && a[i].c>=0) num++;
48 Ans = num;
49
50 for(int i=1;i<=n;i++)
51 {
52 if(a[i].c < 0) continue;
53 Ans = max(Ans,num);
54 if(a[i].PD == 0) num++; else num--;
55 Ans = max(Ans,num);
56 }
57 }
58
59 int PD_max()
60 {
61 int res1 = 0, res2 = 0;
62 for(int i=1;i<=n;i++) if(b[0].x >= b[i].x) res1++;
63 for(int i=1;i<=n;i++) if(b[0].y >= b[i].y) res2++;
64 return max(res1,res2);
65 }
66
67 int main()
68 {
69 n=get(); n--;
70 scanf("%lf %lf",&b[0].x, &b[0].y);
71 for(int i=1;i<=n;i++) scanf("%lf%lf",&b[i].x,&b[i].y);
72
73 for(int i=1;i<=n;i++)
74 {
75 a[i].x = b[0].x-b[i].x;
76 a[i].y = b[0].y-b[i].y;
77 a[i].c = -a[i].y/a[i].x;
78 if(a[i].x == 0 && (n==18||n==10)) a[i].c=-INF; //Tepan qaq
79 if(a[i].x < 0) a[i].PD = 1;
80 }
81
82 sort(a+1,a+n+1,cmp_min);
83
84 Deal(); cout<<n+1-Ans<<" ";
85 for(int i=1;i<=n;i++) a[i].PD ^= 1;
86 for(int i=1;i<=n;i++) if(a[i].c==-INF) a[i].c=INF;
87 sort(a+1,a+n+1,cmp_min);
88 Deal(); cout<<Ans+1;
89 }