#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
const int N = 318;
struct point {
int x,y;
int idx;
point(){}
point(int a, int b, int c) {
x=a;
y=b;
idx=c;
}
};
int tests,current_case;
int n;
point a[N];
int ans[N];
point pta,ptb;
point good[N];
int sz;
int c3[N],c1[N],c1c3[N];
set < point > s;
map < point, int > code;
int all;
int it[N];
void message(int current_case) {
//cerr<<"Case "<<current_case<<" solved!"<<endl;
fprintf(stderr, "Case %d solved!\n", current_case);
}
void update(int pos, int val) {
for(;pos<=all;pos+=pos&(-pos)) it[pos]+=val;
}
int query(int pos) {
--pos;
int ans=0;
for(;pos>=1;pos-=pos&(-pos)) ans+=it[pos];
return ans;
}
void compress() {
code.clear();
sort(good+1,good+1+sz);
for(int i=1;i<=sz;i++) {
code[good[i]]=i;
}
}
int count_less2(point a) {
return query(code[a]);
}
long long oriented_area(point a, point b, point c) {
return ((a.x-b.x)*1ll*(a.y+b.y) + (b.x-c.x)*1ll*(b.y+c.y) + (c.x-a.x)*1ll*(c.y+a.y));
}
long long area(point a, point b, point c) {
return abs(oriented_area(a,b,c));
}
bool operator <(const point &a, const point &b) {
return oriented_area(ptb,b,a)>0;
}
bool cmpa(point a, point b) {
return oriented_area(pta,a,b)<0;
}
int count_less(point a) {
int ans;
set < point >::iterator it;
s.insert(a);
it=s.find(a);
ans=distance(s.begin(),it);
s.erase(it);
return ans;
}
void solve() {
sz=0;
int i;
for(i=1;i<=n;i++) if(oriented_area(pta,ptb,a[i])>0) {
good[++sz]=a[i];
}
compress();
all=sz;
sort(good+1,good+1+sz);
for(i=1;i<=sz;i++) c1c3[good[i].idx]=i-1;
s.clear();
memset(it,0,sizeof(it));
sort(good+1,good+1+sz,cmpa);
for(i=1;i<=sz;i++) {
c3[good[i].idx]=count_less2(good[i]);
//s.insert(good[i]);
update(code[good[i]],1);
c1[good[i].idx]=c1c3[good[i].idx]-c3[good[i].idx];
++ans[c1[good[i].idx]];
}
}
int main() {
//ios_base::sync_with_stdio(false);
//cin.tie(NULL);
freopen("triangles.in","r",stdin);
freopen("triangles.out","w",stdout);
int i,j;
tests=1;
//scanf("%d", &tests);
//cin>>tests;
for(current_case=1;current_case<=tests;current_case++) {
scanf("%d", &n);
for(i=1;i<=n;i++) {
scanf("%d %d", &a[i].x, &a[i].y);
a[i].idx=i;
}
memset(ans,0,sizeof(ans));
for(i=1;i<=n;i++) {
for(j=1;j<=n;j++) {
if(i==j) continue;
pta=a[i];
ptb=a[j];
solve();
}
}
for(i=0;i<=n-3;i++) {
printf("%d\n", ans[i]/3);
}
MESSAGE:
message(current_case);
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNkZWZpbmUgZW5kbCAnXG4nCgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKY29uc3QgaW50IE4gPSAzMTg7CgpzdHJ1Y3QgcG9pbnQgewogICAgaW50IHgseTsKICAgIGludCBpZHg7CiAgICBwb2ludCgpe30KICAgIHBvaW50KGludCBhLCBpbnQgYiwgaW50IGMpIHsKICAgICAgICB4PWE7CiAgICAgICAgeT1iOwogICAgICAgIGlkeD1jOwogICAgfQp9OwoKaW50IHRlc3RzLGN1cnJlbnRfY2FzZTsKaW50IG47CnBvaW50IGFbTl07CmludCBhbnNbTl07CnBvaW50IHB0YSxwdGI7CnBvaW50IGdvb2RbTl07CmludCBzejsKaW50IGMzW05dLGMxW05dLGMxYzNbTl07CnNldCA8IHBvaW50ID4gczsKbWFwIDwgcG9pbnQsIGludCA+IGNvZGU7CmludCBhbGw7CmludCBpdFtOXTsKCnZvaWQgbWVzc2FnZShpbnQgY3VycmVudF9jYXNlKSB7CiAgICAvL2NlcnI8PCJDYXNlICI8PGN1cnJlbnRfY2FzZTw8IiBzb2x2ZWQhIjw8ZW5kbDsKICAgIGZwcmludGYoc3RkZXJyLCAiQ2FzZSAlZCBzb2x2ZWQhXG4iLCBjdXJyZW50X2Nhc2UpOwp9Cgp2b2lkIHVwZGF0ZShpbnQgcG9zLCBpbnQgdmFsKS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GVzdHM7CiAgICBmb3IoY3VycmVudF9jYXNlPTE7Y3VycmVudF9jYXNlPD10ZXN0cztjdXJyZW50X2Nhc2UrKykgewogICAgICAgIHNjYW5mKCIlZCIsICZuKTsKICAgICAgICBmb3IoaT0xO2k8PW47aSsrKSB7CiAgICAgICAgICAgIHNjYW5mKCIlZCAlZCIsICZhW2ldLngsICZhW2ldLnkpOwogICAgICAgICAgICBhW2ldLmlkeD1pOwogICAgICAgIH0KICAgICAgICBtZW1zZXQoYW5zLDAsc2l6ZW9mKGFucykpOwogICAgICAgIGZvcihpPTE7aTw9bjtpKyspIHsKICAgICAgICAgICAgZm9yKGo9MTtqPD1uO2orKykgewogICAgICAgICAgICAgICAgaWYoaT09aikgY29udGludWU7CiAgICAgICAgICAgICAgICBwdGE9YVtpXTsKICAgICAgICAgICAgICAgIHB0Yj1hW2pdOwogICAgICAgICAgICAgICAgc29sdmUoKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBmb3IoaT0wO2k8PW4tMztpKyspIHsKICAgICAgICAgICAgcHJpbnRmKCIlZFxuIiwgYW5zW2ldLzMpOwogICAgICAgIH0KCiAgICAgICAgTUVTU0FHRToKICAgICAgICBtZXNzYWdlKGN1cnJlbnRfY2FzZSk7CiAgICB9CgogICAgcmV0dXJuIDA7Cn0K