#include <bits/stdc++.h>
namespace ioput{
    using namespace std;
    typedef long long ll;
    typedef unsigned long long ull;
    typedef unsigned int UINT;
    #define FAST_IO std::ios::sync_with_stdio(false),std::cin.tie(0),std::cout.tie(0)
    #define SanI(x) (scanf("%d", &(x)))
    #define SanL(x) (scanf("%ld", &(x)))
    #define SanLL(x) (scanf("%lld", &(x)))
    #define SanFD(x) (scanf("%f", &(x)))
    #define SanD(x) (scanf("%ld", &(x)))
    #define SanStr(x) (scanf("%s", (x)))
    #define SanCh(x) (scanf("%c", &(x)))
    #define PAUSE system("pause")
    inline int bitnum(ll x){
        return (ll)(std::log10(x)) + 1;
    }
}using namespace ioput;
int const maxn = 1e5;
//Ax+By+c= 0
// A = y2 - y1
// B = x2 - x1
// C = By1 - Ax1
// （1）平行：A1B2-A2B1=0且两直线不重合
// （2）垂直：A1A2+B1B2=0
// （3）相交：A1B2-A2B1≠0
struct point{
    int x, y;
    point(const int &_x = 0, const int &_y = 0):
        x(_x), y(_y){}

};
struct line{
    int a, b, c;
    line(const int &_a = 0, const int &_b = 0, const int &_c = 0) :
        a(_a), b(_b), c(_c){}
    line(const point &d1, const point &d2):
        a(d1.y - d2.y), b(d1.x - d2.x), c(b * d1.y - a * d1.x){}
}l[100 * 100];
point p[100];
map<pair<int ,int>, int> mp;
set<pair<int, int>> st;
int main(void){
    FAST_IO;
    int n, cnt = 0;
    cin >> n;
    for (int i = 0; i < n; i++)
    {
        cin >> p[i].x >> p[i].y;
    }
    for (int i = 0; i < n; i++){
        for (int j = i + 1; j < n; j++){
            int a = p[i].y - p[j].y;
            int b = p[i].x - p[j].x;
            int x = __gcd(a, b);
            a /= x;
            b /= x;
            int c = a * p[i].x - b * p[i].y;
            if (b != 0 && !st.count({-a / b, c})){
                st.insert({-a / b, c});
                l[cnt++] = line(a, b, c);
            } else if (b == 0 && !st.count({maxn, c})){
                st.insert({maxn, c});
                l[cnt++] = line(a, b, c);
            }
        }
    }
    int ans = 0;
    for (int i = 0; i < cnt; i++)
    {
        for (int j = i + 1; j < cnt; j++){
            if (l[i].a * l[j].b - l[i].b * l[j].a != 0){
                int x = (l[i].b * l[j].c - l[j].b * l[i].c) / (l[i].a * l[j].b - l[j].a * l[i].b);
                int y = (l[i].a * l[j].c - l[j].a * l[i].c) / (l[j].a * l[i].b - l[j].b * l[i].a);
                mp[{x, y}]++;
            }
        }
    }
    for (auto &x : mp){
        ans += x.second;
    }
    cout << ans << endl;
    // PAUSE;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef double lf;
typedef long double Lf;
typedef pair <int,int> pii;
typedef pair <ll, ll> pll;

#define TRACE(x) cerr << #x << "  " << x << endl
#define FOR(i, a, b) for (int i = (a); i < int(b); i++)
#define REP(i, n) FOR(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define _ << " " <<

#define fi first
#define sec second
#define mp make_pair
#define pb push_back

#include <iostream>

using namespace std;

class Fraction {
    private:
        // Calculates the greates common divisor with
        // Euclid's algorithm
        // both arguments have to be positive
        long long gcd(long long a, long long b) {
            while (a != b) {
                if (a > b) {
                    a -= b;
                } else {
                    b -= a;
                }
            }
            return a;
        }

    public:
        long long numerator, denominator;

        Fraction() {
            numerator = 0;
            denominator = 1;
        }

        Fraction(long long n, long long d) {
            if (d==0) {
              numerator = n;
              denominator = 0;
            } else if (n == 0) {
                numerator = 0;
                denominator = 1;
            } else {
                int sign = 1;
                if (n < 0) {
                    sign *= -1;
                    n *= -1;
                }
                if (d < 0) {
                    sign *= -1;
                    d *= -1;
                }

                long long tmp = gcd(n, d);
                numerator = n/tmp*sign;
                denominator = d/tmp;
            }
        }

        operator int() {return (numerator)/denominator;}
        operator float() {return ((float)numerator)/denominator;}
        operator double() {return ((double)numerator)/denominator;}
        friend bool operator < (Fraction a, Fraction b) {
          return (ll)a.numerator * b.denominator < (ll)a.denominator * b.numerator;
        }
};

Fraction operator+(const Fraction& lhs, const Fraction& rhs) {
    Fraction tmp(lhs.numerator*rhs.denominator
                +rhs.numerator*lhs.denominator,
                lhs.denominator*rhs.denominator);
    return tmp;
}

Fraction operator+=(Fraction& lhs, const Fraction& rhs) {
    Fraction tmp(lhs.numerator*rhs.denominator
                +rhs.numerator*lhs.denominator,
                lhs.denominator*rhs.denominator);
    lhs = tmp;
    return lhs;
}

Fraction operator-(const Fraction& lhs, const Fraction& rhs) {
    Fraction tmp(lhs.numerator*rhs.denominator
                -rhs.numerator*lhs.denominator,
                lhs.denominator*rhs.denominator);
    return tmp;
}

Fraction operator-=(Fraction& lhs, const Fraction& rhs) {
    Fraction tmp(lhs.numerator*rhs.denominator
                -rhs.numerator*lhs.denominator,
                lhs.denominator*rhs.denominator);
    lhs = tmp;
    return lhs;
}

Fraction operator*(const Fraction& lhs, const Fraction& rhs) {
    Fraction tmp(lhs.numerator*rhs.numerator,
               lhs.denominator*rhs.denominator);
    return tmp;
}

Fraction operator*=(Fraction& lhs, const Fraction& rhs) {
    Fraction tmp(lhs.numerator*rhs.numerator,
               lhs.denominator*rhs.denominator);
    lhs = tmp;
    return lhs;
}

Fraction operator*(int lhs, const Fraction& rhs) {
    Fraction tmp(lhs*rhs.numerator,rhs.denominator);
    return tmp;
}

Fraction operator*(const Fraction& rhs, int lhs) {
    Fraction tmp(lhs*rhs.numerator,rhs.denominator);
    return tmp;
}

Fraction operator/(const Fraction& lhs, const Fraction& rhs) {
    Fraction tmp(lhs.numerator*rhs.denominator,
                 lhs.denominator*rhs.numerator);
    return tmp;
}

std::ostream& operator<<(std::ostream &strm, const Fraction &a) {
    if (a.denominator == 1) {
        strm << a.numerator;
    } else {
        strm << a.numerator << "/" << a.denominator;
    }
    return strm;
}

const int MAXN = 1010;
int n;
int X[MAXN], Y[MAXN];

map <Fraction, int> mapa;
set <pair <Fraction, Fraction> > s;

ll gcd(ll a, ll b) {
  if (!b) return a;
  return gcd(b, a % b);
}

set <ll> nule;

int main() {
  scanf("%d",&n);
  REP(i, n) cin >> X[i] >> Y[i];
  int cnt = 0;
  REP(i, n) {
    REP(j, i) {
      ll a = Y[i] - Y[j];
      ll b = X[i] - X[j];
      ll a1 = (ll)X[i] * Y[j] + (ll)X[j] * Y[i];
      ll b1 = -b;
      if (!b) {
        nule.insert(X[i]);

      }else{

      Fraction t = Fraction(a, b);
      Fraction r = Fraction(a1, b1);
      if (s.count(mp(t, r))) continue;
      s.insert(mp(t, r));
      cnt++;
      mapa[t]++;
      }
    }
  }

  ll sol = (ll)cnt * (cnt - 1) / 2;
  sol += (ll)cnt * nule.size();
  for (auto t : mapa) {
    sol -= (ll)t.sec * (t.sec - 1) / 2;
  }
  printf("%lld\n",sol);
  return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef double lf;
typedef long double Lf;
typedef pair <int,int> pii;
typedef pair <ll, ll> pll;

#define TRACE(x) cerr << #x << "  " << x << endl
#define FOR(i, a, b) for (int i = (a); i < int(b); i++)
#define REP(i, n) FOR(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define _ << " " <<

#define fi first
#define sec second
#define mp make_pair
#define pb push_back

const int MAXN = 1010;
int n;
int X[MAXN], Y[MAXN];

map <pll, int> mapa;
set <pair <pll, pll> > s;

ll gcd(ll a, ll b) {
  if (!b) return a;
  return gcd(b, a % b);
}

int main() {
  scanf("%d",&n);
  REP(i, n) cin >> X[i] >> Y[i];
  int cnt = 0;
  REP(i, n) {
    REP(j, i) {
      ll a = Y[i] - Y[j];
      ll b = X[i] - X[j];
      ll a1 = (ll)X[i] * Y[j] + (ll)X[j] * Y[i];
      ll b1 = b;
      a1 = -a1;

      if (!b) {
        a1 = X[i];
        a = 1e9;
      }
      else {
        if (a == 0) b = 1;
        if (a < 0 && b > 0) { a = -a; b = -b; }
        if (a < 0 && b < 0) { a = -a; b = -b; }
        if (a1 == 0) b1 = 1;
        if (a1 < 0 && b1 > 0) { a1 = -a1; b1 = -b1; }
        if (a1 < 0 && b1 < 0) { a1 = -a1; b1 = -b1; }
        ll g = gcd(a, b);
        a /= g;
        b /= g;
        g = gcd(a1, b1);
        a1 /= g;
        b1 /= g;
      }
      auto t = mp(mp(a, b), mp(a1, b1));
      if (s.count(t)) continue;
      cnt++;
      mapa[mp(a, b)]++;
      s.insert(t);
    }
  }

  ll sol = (ll)cnt * (cnt - 1) / 2;
  for (auto t : mapa) {
    sol -= (ll)t.sec * (t.sec - 1) / 2;
  }
  printf("%lld\n",sol);
  return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef double lf;
typedef long double Lf;
typedef pair <int,int> pii;
typedef pair <ll, ll> pll;

#define TRACE(x) cerr << #x << "  " << x << endl
#define FOR(i, a, b) for (int i = (a); i < int(b); i++)
#define REP(i, n) FOR(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define _ << " " <<

#define fi first
#define sec second
#define mp make_pair
#define pb push_back

const int MAXN = 1010;
int n;
int X[MAXN], Y[MAXN];

map <pll, int> mapa;
set <pair <pll, pll> > s;

ll gcd(ll a, ll b) {
  if (!b) return a;
  return gcd(b, a % b);
}

int main() {
  scanf("%d",&n);
  REP(i, n) cin >> X[i] >> Y[i];
  int cnt = 0;
  REP(i, n) {
    REP(j, i) {
      ll a = Y[i] - Y[j];
      ll b = X[i] - X[j];
      ll a1 = (ll)X[i] * Y[j] + (ll)X[j] * Y[i];
      ll b1 = b;
      a1 = -a1;

      if (!b) {
        a1 = X[i];
        a = 1e9;
      }
      else {
        if (a == 0) b = 1;
        if (a < 0 && b > 0) { a = -a; b = -b; }
        if (a < 0 && b < 0) { a = -a; b = -b; }
        if (a1 == 0) b1 = 1;
        if (a1 < 0 && b1 > 0) { a1 = -a1; b1 = -b1; }
        if (a1 < 0 && b1 < 0) { a1 = -a1; b1 = -b1; }
        ll g = gcd(max(a, -a), max(b, -b));
        a /= g;
        b /= g;
        g = gcd(max(a1, -a1), max(b1, -b1));
        a1 /= g;
        b1 /= g;
      }
      auto t = mp(mp(a, b), mp(a1, b1));
      if (s.count(t)) continue;
      cnt++;
      mapa[mp(a, b)]++;
      s.insert(t);
    }
  }

  ll sol = (ll)cnt * (cnt - 1) / 2;
  for (auto t : mapa) {
    sol -= (ll)t.sec * (t.sec - 1) / 2;
  }
  printf("%lld\n",sol);
  return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef double lf;
typedef long double Lf;
typedef pair <int,int> pii;
typedef pair <ll, ll> pll;

#define TRACE(x) cerr << #x << "  " << x << endl
#define FOR(i, a, b) for (int i = (a); i < int(b); i++)
#define REP(i, n) FOR(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define _ << " " <<

#define fi first
#define sec second
#define mp make_pair
#define pb push_back

const double eps = 1e-9;
const double inf = 1e20;
const double PI = acos(-1);

inline bool lt(double a, double b) { return a+eps < b; }
inline bool gt(double a, double b) { return lt(b, a); }
inline bool eq(double a, double b) { return !lt(a, b) && !gt(a, b); }
inline bool lte(double a, double b) { return !gt(a, b); }
inline bool gte(double a, double b) { return !lt(a, b); }

inline double sqr(double x) { return x*x; }
inline int sgn(double w) { return lt(w, 0) ? -1 : gt(w, 0); }

struct Pt {
  double x, y;
  Pt operator + (const Pt &b) { return {x+b.x, y+b.y}; }
  Pt operator - (const Pt &b) { return {x-b.x, y-b.y}; }
  Pt operator * (const double &b) { return {x*b, y*b}; }
  friend bool operator < (const Pt &a, const Pt &b) {
    if (!eq(a.x, b.x)) return lt(a.x, b.x);
    return lt(a.y, b.y);
  }
};

struct Line {
  double A, B, C;
};

struct Circle {
  Pt c;
  double r;
};

struct Segment {
  Pt a, b;
};

inline double cross(const Pt &a, const Pt &b) { return a.x*b.y - b.x*a.y; }
inline double dot(const Pt &a, const Pt &b) { return a.x*b.x + a.y*b.y; }
inline double norm(const Pt &a) { return sqrt(dot(a, a)); }
inline double dist(Pt a, Pt b) { return norm(b-a); }
inline double angle(const Pt &a, const Pt &b) {
  // angle between vectors a and b, [0, pi]
  return acos(dot(a, b) / norm(a) / norm(b));
}

inline double angle(const Pt &p) {
  return eq(p.y, 0) ? atan2(0, p.x) : atan2(p.y, p.x);
}

inline Pt rotateCCW(const Pt &p, double a) {
  return {p.x*cos(a)-p.y*sin(a), p.x*sin(a)+p.y*cos(a)};
}

inline int ccw(Pt a, Pt b, Pt c) {
  return sgn(cross(b-a, c-a));
}

inline Line cross(const Line &a, const Line &b) {
  return {a.B*b.C-a.C*b.B, -(a.A*b.C-b.A*a.C), a.A*b.B-a.B*b.A};
}

inline Line line_from_pts(const Pt &a, const Pt &b) {
  return cross({a.x, a.y, 1}, {b.x, b.y, 1});
}

inline Line perpendicular_line(const Line &l, const Pt &p) {
  return {-l.B, l.A, l.B*p.x - l.A*p.y};
}

inline double line_pt_dist(const Line &l, const Pt &p) {
  return fabs((l.A*p.x + l.B*p.y + l.C)/sqrt(l.A*l.A + l.B*l.B));
}

inline bool lines_intersect(const Line &a, const Line &b) {
  return !eq(cross(a, b).C, 0);
}

ll gcd(ll a, ll b) {
  if (!b) return a;
  return gcd(b, a % b);
}

const int MAXN = 1010;

int n;
int X[MAXN], Y[MAXN];

map <pii, int> mapa;
set <pair <pair <ll, int>, pii> > s;

int main() {
  scanf("%d",&n);
  REP(i, n) cin >> X[i] >> Y[i];
  int cnt = 0;
  REP(i, n) {
    REP(j, i) {
      int a = Y[i] - Y[j];
      int b = X[i] - X[j];
      if (!b) a = int(1e9);
      ll od;
      if (!b) od = X[i];
      else od = (ll)Y[i] * X[j] + (ll)Y[j] * X[i];
      od = -od;
      ll G = gcd(max(od, -od), max(b, -b));
      int b1 = b;
      if (G) b1 /= G;
      if (G) od /= G;
      if (od > 0 && b1 < 0) {
        od = -od;
        b1 = -b1;
      }
      if (od < 0 && b1 < 0) {
        od = -od;
        b1 = -b1;
      }
      if (od == 0) b1 = 1;

      if (a < 0 && b < 0) {
        a *= -1;
        b *= -1;
      }
      if (a > 0 && b < 0) {
        a *= -1;
        b *= -1;
      }
      if (a == 0) b = 1;
      if (a && b) {
        ll g = gcd(max(a, -a), (ll)max(b, -b));
        a /= g;
        b /= g;
      }

      auto t = mp(mp(od, b1), make_pair(a, b));
      if (s.count(t)) {
        continue;
      }
      mapa[mp(a, b)]++;
      s.insert(t);
      cnt++;
    }
  }

  ll sol = (ll)cnt * (cnt - 1) / 2;
  for (auto t : mapa) {
    sol -= (ll)t.sec * (t.sec - 1) / 2;
  }
  printf("%lld\n",sol);
  return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef double lf;
typedef long double Lf;
typedef pair <int,int> pii;
typedef pair <ll, ll> pll;

#define TRACE(x) cerr << #x << "  " << x << endl
#define FOR(i, a, b) for (int i = (a); i < int(b); i++)
#define REP(i, n) FOR(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define _ << " " <<

#define fi first
#define sec second
#define mp make_pair
#define pb push_back

const double eps = 1e-9;
const double inf = 1e20;
const double PI = acos(-1);

inline bool lt(double a, double b) { return a+eps < b; }
inline bool gt(double a, double b) { return lt(b, a); }
inline bool eq(double a, double b) { return !lt(a, b) && !gt(a, b); }
inline bool lte(double a, double b) { return !gt(a, b); }
inline bool gte(double a, double b) { return !lt(a, b); }

inline double sqr(double x) { return x*x; }
inline int sgn(double w) { return lt(w, 0) ? -1 : gt(w, 0); }

struct Pt {
  double x, y;
  Pt operator + (const Pt &b) { return {x+b.x, y+b.y}; }
  Pt operator - (const Pt &b) { return {x-b.x, y-b.y}; }
  Pt operator * (const double &b) { return {x*b, y*b}; }
  friend bool operator < (const Pt &a, const Pt &b) {
    if (!eq(a.x, b.x)) return lt(a.x, b.x);
    return lt(a.y, b.y);
  }
};

struct Line {
  double A, B, C;
};

struct Circle {
  Pt c;
  double r;
};

struct Segment {
  Pt a, b;
};

inline double cross(const Pt &a, const Pt &b) { return a.x*b.y - b.x*a.y; }
inline double dot(const Pt &a, const Pt &b) { return a.x*b.x + a.y*b.y; }
inline double norm(const Pt &a) { return sqrt(dot(a, a)); }
inline double dist(Pt a, Pt b) { return norm(b-a); }
inline double angle(const Pt &a, const Pt &b) {
  // angle between vectors a and b, [0, pi]
  return acos(dot(a, b) / norm(a) / norm(b));
}

inline double angle(const Pt &p) {
  return eq(p.y, 0) ? atan2(0, p.x) : atan2(p.y, p.x);
}

inline Pt rotateCCW(const Pt &p, double a) {
  return {p.x*cos(a)-p.y*sin(a), p.x*sin(a)+p.y*cos(a)};
}

inline int ccw(Pt a, Pt b, Pt c) {
  return sgn(cross(b-a, c-a));
}

inline Line cross(const Line &a, const Line &b) {
  return {a.B*b.C-a.C*b.B, -(a.A*b.C-b.A*a.C), a.A*b.B-a.B*b.A};
}

inline Line line_from_pts(const Pt &a, const Pt &b) {
  return cross({a.x, a.y, 1}, {b.x, b.y, 1});
}

inline Line perpendicular_line(const Line &l, const Pt &p) {
  return {-l.B, l.A, l.B*p.x - l.A*p.y};
}

inline double line_pt_dist(const Line &l, const Pt &p) {
  return fabs((l.A*p.x + l.B*p.y + l.C)/sqrt(l.A*l.A + l.B*l.B));
}

inline bool lines_intersect(const Line &a, const Line &b) {
  return !eq(cross(a, b).C, 0);
}

ll gcd(ll a, ll b) {
  if (!b) return a;
  return gcd(b, a % b);
}

const int MAXN = 1010;

int n;
int X[MAXN], Y[MAXN];

map <pll, int> mapa;
set <pair <pll, pll> > s;

int main() {
  scanf("%d",&n);
  REP(i, n) cin >> X[i] >> Y[i];
  int cnt = 0;
  REP(i, n) {
    REP(j, i) {
      ll a = Y[i] - Y[j];
      ll b = X[i] - X[j];
      ll a1 = (ll)X[i] * Y[j] + (ll)X[j] * Y[i];
      ll b1 = b;

      if (!b) {
        a1 = X[i];
        a = 1e9;
      }
      else {
        if (a == 0) b = 1;
        if (a < 0 && b > 0) { a = -a; b = -b; }
        if (a < 0 && b < 0) { a = -a; b = -b; }
        if (a1 == 0) b1 = 1;
        if (a1 < 0 && b1 > 0) { a1 = -a1; b1 = -b1; }
        if (a1 < 0 && b1 < 0) { a1 = -a1; b1 = -b1; }
        ll g = gcd(a, b);
        a /= g;
        b /= g;
        g = gcd(a1, b1);
        a1 /= g;
        b1 /= g;
      }
      auto t = mp(mp(a, b), mp(a1, b1));
      if (s.count(t)) continue;
      cnt++;
      mapa[mp(a, b)]++;
      s.insert(t);
    }
  }

  ll sol = (ll)cnt * (cnt - 1) / 2;
  for (auto t : mapa) {
    sol -= (ll)t.sec * (t.sec - 1) / 2;
  }
  printf("%lld\n",sol);
  return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef double lf;
typedef long double Lf;
typedef pair <int,int> pii;
typedef pair <ll, ll> pll;

#define TRACE(x) cerr << #x << "  " << x << endl
#define FOR(i, a, b) for (int i = (a); i < int(b); i++)
#define REP(i, n) FOR(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define _ << " " <<

#define fi first
#define sec second
#define mp make_pair
#define pb push_back

const double eps = 1e-9;
const double inf = 1e20;
const double PI = acos(-1);

inline bool lt(double a, double b) { return a+eps < b; }
inline bool gt(double a, double b) { return lt(b, a); }
inline bool eq(double a, double b) { return !lt(a, b) && !gt(a, b); }
inline bool lte(double a, double b) { return !gt(a, b); }
inline bool gte(double a, double b) { return !lt(a, b); }

inline double sqr(double x) { return x*x; }
inline int sgn(double w) { return lt(w, 0) ? -1 : gt(w, 0); }

struct Pt {
  double x, y;
  Pt operator + (const Pt &b) { return {x+b.x, y+b.y}; }
  Pt operator - (const Pt &b) { return {x-b.x, y-b.y}; }
  Pt operator * (const double &b) { return {x*b, y*b}; }
  friend bool operator < (const Pt &a, const Pt &b) {
    if (!eq(a.x, b.x)) return lt(a.x, b.x);
    return lt(a.y, b.y);
  }
};

struct Line {
  double A, B, C;
};

struct Circle {
  Pt c;
  double r;
};

struct Segment {
  Pt a, b;
};

inline double cross(const Pt &a, const Pt &b) { return a.x*b.y - b.x*a.y; }
inline double dot(const Pt &a, const Pt &b) { return a.x*b.x + a.y*b.y; }
inline double norm(const Pt &a) { return sqrt(dot(a, a)); }
inline double dist(Pt a, Pt b) { return norm(b-a); }
inline double angle(const Pt &a, const Pt &b) {
  // angle between vectors a and b, [0, pi]
  return acos(dot(a, b) / norm(a) / norm(b));
}

inline double angle(const Pt &p) {
  return eq(p.y, 0) ? atan2(0, p.x) : atan2(p.y, p.x);
}

inline Pt rotateCCW(const Pt &p, double a) {
  return {p.x*cos(a)-p.y*sin(a), p.x*sin(a)+p.y*cos(a)};
}

inline int ccw(Pt a, Pt b, Pt c) {
  return sgn(cross(b-a, c-a));
}

inline Line cross(const Line &a, const Line &b) {
  return {a.B*b.C-a.C*b.B, -(a.A*b.C-b.A*a.C), a.A*b.B-a.B*b.A};
}

inline Line line_from_pts(const Pt &a, const Pt &b) {
  return cross({a.x, a.y, 1}, {b.x, b.y, 1});
}

inline Line perpendicular_line(const Line &l, const Pt &p) {
  return {-l.B, l.A, l.B*p.x - l.A*p.y};
}

inline double line_pt_dist(const Line &l, const Pt &p) {
  return fabs((l.A*p.x + l.B*p.y + l.C)/sqrt(l.A*l.A + l.B*l.B));
}

inline bool lines_intersect(const Line &a, const Line &b) {
  return !eq(cross(a, b).C, 0);
}

ll gcd(ll a, ll b) {
  if (!b) return a;
  return gcd(b, a % b);
}

const int MAXN = 1010;

int n;
int X[MAXN], Y[MAXN];

map <pii, int> mapa;
set <pair <pair <ll, int>, pii> > s;

int main() {
  scanf("%d",&n);
  REP(i, n) cin >> X[i] >> Y[i];
  int cnt = 0;
  REP(i, n) {
    REP(j, i) {
      int a = Y[i] - Y[j];
      int b = X[i] - X[j];
      if (!b) a = int(1e9);
      ll od;
      if (!b) od = X[i];
      else od = (ll)Y[i] * X[j] + (ll)Y[j] * X[i];
      od = -od;
      ll G = gcd(max(od, -od), max(b, -b));
      int b1 = b;
      if (G) b1 /= G;
      if (G) od /= G;
      if (od > 0 && b1 < 0) {
        od = -od;
        b1 = -b1;
      }
      if (od < 0 && b1 < 0) {
        od = -od;
        b1 = -b1;
      }
      if (od == 0 && b1 != 0) b1 = 1;
      if (b1 == 0) od = X[i];

      if (a < 0 && b < 0) {
        a *= -1;
        b *= -1;
      }
      if (a > 0 && b < 0) {
        a *= -1;
        b *= -1;
      }
      if (a == 0 && b) b = 1;
      if (a && b) {
        ll g = gcd(max(a, -a), (ll)max(b, -b));
        a /= g;
        b /= g;
      }

      auto t = mp(mp(od, b1), make_pair(a, b));
      if (s.count(t)) {
        continue;
      }
      mapa[mp(a, b)]++;
      s.insert(t);
      cnt++;
    }
  }

  ll sol = (ll)cnt * (cnt - 1) / 2;
  for (auto t : mapa) {
    sol -= (ll)t.sec * (t.sec - 1) / 2;
  }
  printf("%lld\n",sol);
  return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef double lf;
typedef long double Lf;
typedef pair <int,int> pii;
typedef pair <ll, ll> pll;

#define TRACE(x) cerr << #x << "  " << x << endl
#define FOR(i, a, b) for (int i = (a); i < int(b); i++)
#define REP(i, n) FOR(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define _ << " " <<

#define fi first
#define sec second
#define mp make_pair
#define pb push_back

const double eps = 1e-9;
const double inf = 1e20;
const double PI = acos(-1);

inline bool lt(double a, double b) { return a+eps < b; }
inline bool gt(double a, double b) { return lt(b, a); }
inline bool eq(double a, double b) { return !lt(a, b) && !gt(a, b); }
inline bool lte(double a, double b) { return !gt(a, b); }
inline bool gte(double a, double b) { return !lt(a, b); }

inline double sqr(double x) { return x*x; }
inline int sgn(double w) { return lt(w, 0) ? -1 : gt(w, 0); }

struct Pt {
  double x, y;
  Pt operator + (const Pt &b) { return {x+b.x, y+b.y}; }
  Pt operator - (const Pt &b) { return {x-b.x, y-b.y}; }
  Pt operator * (const double &b) { return {x*b, y*b}; }
  friend bool operator < (const Pt &a, const Pt &b) {
    if (!eq(a.x, b.x)) return lt(a.x, b.x);
    return lt(a.y, b.y);
  }
};

struct Line {
  double A, B, C;
};

struct Circle {
  Pt c;
  double r;
};

struct Segment {
  Pt a, b;
};

inline double cross(const Pt &a, const Pt &b) { return a.x*b.y - b.x*a.y; }
inline double dot(const Pt &a, const Pt &b) { return a.x*b.x + a.y*b.y; }
inline double norm(const Pt &a) { return sqrt(dot(a, a)); }
inline double dist(Pt a, Pt b) { return norm(b-a); }
inline double angle(const Pt &a, const Pt &b) {
  // angle between vectors a and b, [0, pi]
  return acos(dot(a, b) / norm(a) / norm(b));
}

inline double angle(const Pt &p) {
  return eq(p.y, 0) ? atan2(0, p.x) : atan2(p.y, p.x);
}

inline Pt rotateCCW(const Pt &p, double a) {
  return {p.x*cos(a)-p.y*sin(a), p.x*sin(a)+p.y*cos(a)};
}

inline int ccw(Pt a, Pt b, Pt c) {
  return sgn(cross(b-a, c-a));
}

inline Line cross(const Line &a, const Line &b) {
  return {a.B*b.C-a.C*b.B, -(a.A*b.C-b.A*a.C), a.A*b.B-a.B*b.A};
}

inline Line line_from_pts(const Pt &a, const Pt &b) {
  return cross({a.x, a.y, 1}, {b.x, b.y, 1});
}

inline Line perpendicular_line(const Line &l, const Pt &p) {
  return {-l.B, l.A, l.B*p.x - l.A*p.y};
}

inline double line_pt_dist(const Line &l, const Pt &p) {
  return fabs((l.A*p.x + l.B*p.y + l.C)/sqrt(l.A*l.A + l.B*l.B));
}

inline bool lines_intersect(const Line &a, const Line &b) {
  return !eq(cross(a, b).C, 0);
}

ll gcd(ll a, ll b) {
  if (!b) return a;
  return gcd(b, a % b);
}

const int MAXN = 1010;

int n;
int X[MAXN], Y[MAXN];

map <pii, int> mapa;
set <pair <pair <ll, int>, pii> > s;

int main() {
  scanf("%d",&n);
  REP(i, n) cin >> X[i] >> Y[i];
  int cnt = 0;
  REP(i, n) {
    REP(j, i) {
      int a = Y[i] - Y[j];
      int b = X[i] - X[j];
      if (!b) a = int(1e9);
      ll od;
      if (!b) od = X[i];
      else od = (ll)Y[i] * X[j] + (ll)Y[j] * X[i];
      od = -od;
      ll G = gcd(max(od, -od), max(b, -b));
      int b1 = b;
      if (G) b1 /= G;
      if (G) od /= G;
      if (od > 0 && b1 < 0) {
        od = -od;
        b1 = -b1;
      }
      if (od < 0 && b1 < 0) {
        od = -od;
        b1 = -b1;
      }
      if (od == 0) b1 = 1;
      if (b1 == 0) od = X[i];

      if (a < 0 && b < 0) {
        a *= -1;
        b *= -1;
      }
      if (a > 0 && b < 0) {
        a *= -1;
        b *= -1;
      }
      if (a == 0) b = 1;
      if (a && b) {
        ll g = gcd(max(a, -a), (ll)max(b, -b));
        a /= g;
        b /= g;
      }

      auto t = mp(mp(od, b1), make_pair(a, b));
      if (s.count(t)) {
        continue;
      }
      mapa[mp(a, b)]++;
      s.insert(t);
      cnt++;
    }
  }

  ll sol = (ll)cnt * (cnt - 1) / 2;
  for (auto t : mapa) {
    sol -= (ll)t.sec * (t.sec - 1) / 2;
  }
  printf("%lld\n",sol);
  return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef double lf;
typedef long double Lf;
typedef pair <int,int> pii;
typedef pair <ll, ll> pll;

#define TRACE(x) cerr << #x << "  " << x << endl
#define FOR(i, a, b) for (int i = (a); i < int(b); i++)
#define REP(i, n) FOR(i, 0, n)
#define all(x) (x).begin(), (x).end()
#define _ << " " <<

#define fi first
#define sec second
#define mp make_pair
#define pb push_back

#include <iostream>

using namespace std;

class Fraction {
    private:
        // Calculates the greates common divisor with
        // Euclid's algorithm
        // both arguments have to be positive
        long long gcd(long long a, long long b) {
            while (a != b) {
                if (a > b) {
                    a -= b;
                } else {
                    b -= a;
                }
            }
            return a;
        }

    public:
        long long numerator, denominator;

        Fraction() {
            numerator = 0;
            denominator = 1;
        }

        Fraction(long long n, long long d) {
            if (d==0) {
              numerator = n;
              denominator = 0;
            } else if (n == 0) {
                numerator = 0;
                denominator = 1;
            } else {
                int sign = 1;
                if (n < 0) {
                    sign *= -1;
                    n *= -1;
                }
                if (d < 0) {
                    sign *= -1;
                    d *= -1;
                }

                long long tmp = gcd(n, d);
                numerator = n/tmp*sign;
                denominator = d/tmp;
            }
        }

        operator int() {return (numerator)/denominator;}
        operator float() {return ((float)numerator)/denominator;}
        operator double() {return ((double)numerator)/denominator;}
        friend bool operator < (Fraction a, Fraction b) {
          return (ll)a.numerator * b.denominator < (ll)a.denominator * b.numerator;
        }
};

Fraction operator+(const Fraction& lhs, const Fraction& rhs) {
    Fraction tmp(lhs.numerator*rhs.denominator
                +rhs.numerator*lhs.denominator,
                lhs.denominator*rhs.denominator);
    return tmp;
}

Fraction operator+=(Fraction& lhs, const Fraction& rhs) {
    Fraction tmp(lhs.numerator*rhs.denominator
                +rhs.numerator*lhs.denominator,
                lhs.denominator*rhs.denominator);
    lhs = tmp;
    return lhs;
}

Fraction operator-(const Fraction& lhs, const Fraction& rhs) {
    Fraction tmp(lhs.numerator*rhs.denominator
                -rhs.numerator*lhs.denominator,
                lhs.denominator*rhs.denominator);
    return tmp;
}

Fraction operator-=(Fraction& lhs, const Fraction& rhs) {
    Fraction tmp(lhs.numerator*rhs.denominator
                -rhs.numerator*lhs.denominator,
                lhs.denominator*rhs.denominator);
    lhs = tmp;
    return lhs;
}

Fraction operator*(const Fraction& lhs, const Fraction& rhs) {
    Fraction tmp(lhs.numerator*rhs.numerator,
               lhs.denominator*rhs.denominator);
    return tmp;
}

Fraction operator*=(Fraction& lhs, const Fraction& rhs) {
    Fraction tmp(lhs.numerator*rhs.numerator,
               lhs.denominator*rhs.denominator);
    lhs = tmp;
    return lhs;
}

Fraction operator*(int lhs, const Fraction& rhs) {
    Fraction tmp(lhs*rhs.numerator,rhs.denominator);
    return tmp;
}

Fraction operator*(const Fraction& rhs, int lhs) {
    Fraction tmp(lhs*rhs.numerator,rhs.denominator);
    return tmp;
}

Fraction operator/(const Fraction& lhs, const Fraction& rhs) {
    Fraction tmp(lhs.numerator*rhs.denominator,
                 lhs.denominator*rhs.numerator);
    return tmp;
}

std::ostream& operator<<(std::ostream &strm, const Fraction &a) {
    if (a.denominator == 1) {
        strm << a.numerator;
    } else {
        strm << a.numerator << "/" << a.denominator;
    }
    return strm;
}

const int MAXN = 1010;
int n;
int X[MAXN], Y[MAXN];

map <Fraction, int> mapa;
set <pair <Fraction, Fraction> > s;

ll gcd(ll a, ll b) {
  if (!b) return a;
  return gcd(b, a % b);
}

set <ll> nule;

int main() {
  scanf("%d",&n);
  REP(i, n) cin >> X[i] >> Y[i];
  int cnt = 0;
  REP(i, n) {
    REP(j, i) {
      ll a = Y[i] - Y[j];
      ll b = X[i] - X[j];
      ll a1 = (ll)X[i] * Y[j] - (ll)X[j] * Y[i];
      ll b1 = -b;
      if (!b) {
        nule.insert(X[i]);

      }else{

      Fraction t = Fraction(a, b);
      Fraction r = Fraction(a1, b1);
      if (s.count(mp(t, r))) continue;
      s.insert(mp(t, r));
      cnt++;
      mapa[t]++;
      }
    }
  }

  ll sol = (ll)cnt * (cnt - 1) / 2;
  sol += (ll)cnt * nule.size();
  for (auto t : mapa) {
    sol -= (ll)t.sec * (t.sec - 1) / 2;
  }
  printf("%lld\n",sol);
  return 0;
}


/* ****Ragnar7**** */
/* It's Going to be Hard, but hard does not mean Impossible. */
#include<bits/stdc++.h>
#define ll          int
#define hell        1000000007
using namespace std;

ll vis[10005][10005];
int main()
{
	ll n;cin>>n;
	vector<pair<ll,ll> > v;
	vector<ll> temp(10005,0);
	ll x,y,tx,ty,g,i,j,k,l,tl=0;
	for(i=0;i<n;i++)
	{
		cin>>x>>y;
		v.push_back({x,y});
	}
	map<pair<ll,ll> ,ll> m;
	for(i=0;i<n;i++)
	{
		for(j=i+1;j<n;j++)
		{
			tl=0;
			if(vis[i][j])
				continue;
			temp[tl++]=i;temp[tl++]=j;
			for(k=j+1;k<n;k++)
				if((v[i].first-v[j].first)*(v[i].second-v[k].second)==(v[i].first-v[k].first)*(v[i].second-v[j].second))
					temp[tl++]=k;
			x=v[i].first-v[j].first;
			y=v[i].second-v[j].second;
			tx=abs(x);
			ty=abs(y);
			if(x<0 and y>=0)
				tx*=-1;
			else if(y<0 and x>=0)
				tx*=-1;
			g=__gcd(abs(tx),abs(ty));
			if(g!=0)
			{
				tx/=g;
				ty/=g;
			}
			m[{tx,ty}]++;
			for(k=0;k<tl;k++)
			{
				for(l=k+1;l<tl;l++)
				{
					vis[temp[k]][temp[l]]=1;
					vis[temp[l]][temp[k]]=1;

				}
			}
		}
	}
	map<pair<ll,ll>,ll>::iterator itr;
	ll lol=0,ans=0;
	for( itr=m.begin(); itr!=m.end();itr++)
	{
		lol+=itr->second;
		//cout<<i->first.first<<" "<<i->first.second<<" "<<i->second<<"\n";
		ans-=(itr->second*(itr->second-1))/2;
	}
	cout<<ans+(lol*(lol-1))/2;
	return 0;
}


/* ****Ragnar7**** */
/* It's Going to be Hard, but hard does not mean Impossible. */
#include<bits/stdc++.h>
#define ll          long long
#define hell        1000000007
using namespace std;

ll vis[10005][10005];
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	ll n;cin>>n;
	vector<pair<ll,ll> > v;
	vector<ll> temp(10005,0);
	ll x,y,tx,ty,g,i,j,k,l,tl=0;
	for(i=0;i<n;i++)
	{
		cin>>x>>y;
		v.push_back({x,y});
	}
	map<pair<ll,ll> ,ll> m;
	for(i=0;i<n;i++)
	{
		for(j=i+1;j<n;j++)
		{
			tl=0;
			if(vis[i][j])
				continue;
			temp[tl++]=i;temp[tl++]=j;
			for(k=j+1;k<n;k++)
				if((v[i].first-v[j].first)*(v[i].second-v[k].second)==(v[i].first-v[k].first)*(v[i].second-v[j].second))
					temp[tl++]=k;
			x=v[i].first-v[j].first;
			y=v[i].second-v[j].second;
			tx=abs(x);
			ty=abs(y);
			if(x<0 and y>=0)
				tx*=-1;
			else if(y<0 and x>=0)
				tx*=-1;
			g=__gcd(abs(tx),abs(ty));
			if(g!=0)
			{
				tx/=g;
				ty/=g;
			}
			m[{tx,ty}]++;
			for(k=0;k<tl;k++)
			{
				for(l=k+1;l<tl;l++)
				{
					vis[temp[k]][temp[l]]=1;
					vis[temp[l]][temp[k]]=1;

				}
			}
		}
	}
	map<pair<ll,ll>,ll>::iterator itr;
	ll lol=0,ans=0;
	for( itr=m.begin(); itr!=m.end();itr++)
	{
		lol+=itr->second;
		//cout<<i->first.first<<" "<<i->first.second<<" "<<i->second<<"\n";
		ans-=(itr->second*(itr->second-1))/2;
	}
	cout<<ans+(lol*(lol-1))/2;
	return 0;
}


/* ****Ragnar7**** */
/* It's Going to be Hard, but hard does not mean Impossible. */
#include<bits/stdc++.h>
#define ll          int
#define hell        1000000007
using namespace std;

//ll vis[10005][10005];
int main()
{
	ll n;cin>>n;
	vector<pair<ll,ll> > v;
	vector<ll> temp(10005,0);
	ll x,y,tx,ty,g,i,j,k,l,tl=0;
	map<pair<ll,ll>,ll > mp;
	for(i=0;i<n;i++)
	{
		cin>>x>>y;
		v.push_back({x,y});
	}
	map<pair<ll,ll> ,ll> m;
	for(i=0;i<n;i++)
	{
		for(j=i+1;j<n;j++)
		{
			tl=0;
			if(mp[{i,j}] or mp[{j,i}])
				continue;
			temp[tl++]=i;temp[tl++]=j;
			for(k=j+1;k<n;k++)
				if((v[i].first-v[j].first)*(v[i].second-v[k].second)==(v[i].first-v[k].first)*(v[i].second-v[j].second))
					temp[tl++]=k;
			x=v[i].first-v[j].first;
			y=v[i].second-v[j].second;
			tx=abs(x);
			ty=abs(y);
			if(x<0 and y>=0)
				tx*=-1;
			else if(y<0 and x>=0)
				tx*=-1;
			g=__gcd(abs(tx),abs(ty));
			if(g!=0)
			{
				tx/=g;
				ty/=g;
			}
			m[{tx,ty}]++;
			for(k=0;k<tl;k++)
			{
				for(l=k+1;l<tl;l++)
				{
					// vis[temp[k]][temp[l]]=1;
					// vis[temp[l]][temp[k]]=1;
					mp[{temp[k],temp[l]}]=1;

				}
			}
		}
	}
	map<pair<ll,ll>,ll>::iterator itr;
	ll lol=0,ans=0;
	for( itr=m.begin(); itr!=m.end();itr++)
	{
		lol+=itr->second;
		//cout<<i->first.first<<" "<<i->first.second<<" "<<i->second<<"\n";
		ans-=(itr->second*(itr->second-1))/2;
	}
	cout<<ans+(lol*(lol-1))/2;
	return 0;
}


/* ****Ragnar7**** */
/* It's Going to be Hard, but hard does not mean Impossible. */
#include<bits/stdc++.h>
#define ll          long long
#define hell        1000000007
using namespace std;

ll vis[1005][1005];
int main()
{
	ll n;cin>>n;
	vector<pair<ll,ll> > v;
	vector<ll> temp(10005,0);
	ll x,y,tx,ty,g,i,j,k,l,tl=0;
	for(i=0;i<n;i++)
	{
		cin>>x>>y;
		v.push_back({x,y});
	}
	map<pair<ll,ll> ,ll> m;
	for(i=0;i<n;i++)
	{
		for(j=i+1;j<n;j++)
		{
			tl=0;
			if(vis[i][j])
				continue;
			temp[tl++]=i;temp[tl++]=j;
			for(k=j+1;k<n;k++)
				if((v[i].first-v[j].first)*(v[i].second-v[k].second)==(v[i].first-v[k].first)*(v[i].second-v[j].second))
					temp[tl++]=k;
			x=v[i].first-v[j].first;
			y=v[i].second-v[j].second;
			tx=abs(x);
			ty=abs(y);
			if(x<0 and y>=0)
				tx*=-1;
			else if(y<0 and x>=0)
				tx*=-1;
			g=__gcd(abs(tx),abs(ty));
			if(g!=0)
			{
				tx/=g;
				ty/=g;
			}
			m[{tx,ty}]++;
			for(k=0;k<tl;k++)
			{
				for(l=k+1;l<tl;l++)
				{
					vis[temp[k]][temp[l]]=1;
					vis[temp[l]][temp[k]]=1;
				}
			}
		}
	}
	map<pair<ll,ll>,ll>::iterator itr;
	ll lol=0,ans=0;
	for( itr=m.begin(); itr!=m.end();itr++)
	{
		lol+=itr->second;
		//cout<<i->first.first<<" "<<i->first.second<<" "<<i->second<<"\n";
		ans-=(itr->second*(itr->second-1))/2;
	}
	cout<<ans+(lol*(lol-1))/2;
	return 0;
}


/* ****Ragnar7**** */
/* It's Going to be Hard, but hard does not mean Impossible. */
#include<bits/stdc++.h>
#define ll          int
#define hell        1000000007
using namespace std;

//ll vis[10005][10005];
int main()
{
	ll n;cin>>n;
	vector<pair<ll,ll> > v;
	vector<ll> temp(10005,0);
	ll x,y,tx,ty,g,i,j,k,l,tl=0;
	map<pair<ll,ll>,ll > mp;
	for(i=0;i<n;i++)
	{
		cin>>x>>y;
		v.push_back({x,y});
	}
	map<pair<ll,ll> ,ll> m;
	for(i=0;i<n;i++)
	{
		for(j=i+1;j<n;j++)
		{
			tl=0;
			if(mp[{i,j}] or mp[{j,i}])
				continue;
			temp[tl++]=i;temp[tl++]=j;
			for(k=j+1;k<n;k++)
				if((v[i].first-v[j].first)*(v[i].second-v[k].second)==(v[i].first-v[k].first)*(v[i].second-v[j].second))
					temp[tl++]=k;
			x=v[i].first-v[j].first;
			y=v[i].second-v[j].second;
			tx=abs(x);
			ty=abs(y);
			if(x<0 and y>=0)
				tx*=-1;
			else if(y<0 and x>=0)
				tx*=-1;
			g=__gcd(abs(tx),abs(ty));
			if(g!=0)
			{
				tx/=g;
				ty/=g;
			}
			m[{tx,ty}]++;
			for(k=0;k<tl;k++)
			{
				for(l=k+1;l<tl;l++)
				{
					// vis[temp[k]][temp[l]]=1;
					// vis[temp[l]][temp[k]]=1;
					mp[{i,j}]=1;

				}
			}
		}
	}
	map<pair<ll,ll>,ll>::iterator itr;
	ll lol=0,ans=0;
	for( itr=m.begin(); itr!=m.end();itr++)
	{
		lol+=itr->second;
		//cout<<i->first.first<<" "<<i->first.second<<" "<<i->second<<"\n";
		ans-=(itr->second*(itr->second-1))/2;
	}
	cout<<ans+(lol*(lol-1))/2;
	return 0;
}


/* ****Ragnar7**** */
/* It's Going to be Hard, but hard does not mean Impossible. */
#include<bits/stdc++.h>
#define ll          long long
#define hell        1000000007
using namespace std;

ll vis[10005][10005];
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	ll n;cin>>n;
	vector<pair<ll,ll> > v;
	ll x,y;
	for(ll i=0;i<n;i++)
	{
		cin>>x>>y;
		v.push_back({x,y});
	}
	map<pair<ll,ll> ,ll> m;
	for(ll i=0;i<n;i++)
	{
		for(ll j=i+1;j<n;j++)
		{
			vector<ll> temp;
			if(vis[i][j])
				continue;
			temp.push_back(i);temp.push_back(j);
			for(ll k=j+1;k<n;k++)
				if((v[i].first-v[j].first)*(v[i].second-v[k].second)==(v[i].first-v[k].first)*(v[i].second-v[j].second))
					temp.push_back(k);
			x=v[i].first-v[j].first;
			y=v[i].second-v[j].second;
			ll tx=abs(x),ty=abs(y);
			if(x<0 and y>=0)
				tx*=-1;
			else if(y<0 and x>=0)
				tx*=-1;
			ll g=__gcd(abs(tx),abs(ty));
			if(g!=0)
			{
				tx/=g;
				ty/=g;
			}
			m[{tx,ty}]++;
			for(ll k=0;k<temp.size();k++)
			{
				for(ll l=k+1;l<temp.size();l++)
				{
					vis[temp[k]][temp[l]]=1;
					vis[temp[l]][temp[k]]=1;

				}
			}
		}
	}
	map<pair<ll,ll>,ll>::iterator i;
	ll lol=0,ans=0;
	for( i=m.begin(); i!=m.end();i++)
	{
		lol+=i->second;
		//cout<<i->first.first<<" "<<i->first.second<<" "<<i->second<<"\n";
		ans-=(i->second*(i->second-1))/2;
	}
	cout<<ans+(lol*(lol-1))/2;
	return 0;
}


//In the Name of God
//Ya Ali

#include <bits/stdc++.h>

#define pii pair<int, int>

#define err(A) cout << #A << " = " << (A) << endl

using namespace std;

const int maxn = 1024;

int x[maxn], y[maxn];

int n;
int N;

map<pii, int> ccs;
set<pair<pii, int> > yys;
set<int> ys;

int ans;

int bmm(int a, int b)
{
  if (b)
    return bmm(b, a % b);
  return a;
}

pii norm(int a, int b)
{
  if (a < 0)
    a *= -1, b *= -1;
  if (a == 0)
    return {0, 1};
  int d = bmm(a, abs(b));
  return {a / d, b / d};
}

int cc(int a)
{
  return a * (a - 1) / 2;
}

int main()
{
  ios::sync_with_stdio(0); cin.tie(0);

  cin >> n;

  for (int i = 0; i < n; i ++)
    cin >> x[i] >> y[i];

  for (int i = 0; i < n; i ++)
    for (int j = 0; j < i; j ++)
      if (x[i] == x[j])
	{
	  ys.insert(x[i]);
	}
      else
	{
	  pii c = norm(y[i] - y[j], x[i] - x[j]);
	  int d = c.second * y[i] - c.first * x[i];
	  if (yys.count({c, d}))
	    continue;
	  ans -= ccs[c];
	  ccs[c] ++;
	  N ++;
	}

  N += ys.size();

  ans += cc(N);
  ans -= cc(ys.size());

  cout << ans << endl;

  return 0;
}


//In the Name of God
//Ya Ali

#include <bits/stdc++.h>

#define pii pair<int, int>

#define err(A) cout << #A << " = " << (A) << endl

using namespace std;

const int maxn = 1024;

int x[maxn], y[maxn];

int n;
int N;

map<pii, int> ccs;
set<pair<pii, int> > yys;

long long ans;

int bmm(int a, int b)
{
  if (b)
    return bmm(b, a % b);
  return a;
}

pii norm(int a, int b)
{
  if (a < 0)
    a *= -1, b *= -1;
  if (a == 0)
    b = abs(b);
  int d = bmm(a, abs(b));
  return {a / d, b / d};
}

long long cc(long long a)
{
  return a * (a - 1) / 2;
}

int main()
{
  ios::sync_with_stdio(0); cin.tie(0);

  cin >> n;

  for (int i = 0; i < n; i ++)
    cin >> x[i] >> y[i];

  for (int i = 0; i < n; i ++)
    for (int j = 0; j < i; j ++)
      {
	pii c;
	int d;
	if (x[i] == x[j])
	  {
	    c = {1, 0};
	    d = x[i];
	  }
	else
	  {
	    c = norm(y[i] - y[j], x[i] - x[j]);
	    d = c.second * y[i] - c.first * x[i];
	  }
	if (yys.count({c, d}))
	  continue;
	yys.insert({c, d});
	ans -= ccs[c];
	ccs[c] ++;
	N ++;
      }

  ans += cc(N);

  cout << ans << endl;

  return 0;
}


//In the Name of God
//Ya Ali

#include <bits/stdc++.h>

#define pii pair<int, int>

#define err(A) cout << #A << " = " << (A) << endl

using namespace std;

const int maxn = 1024;

int x[maxn], y[maxn];

int n;
int N;

map<pii, int> ccs;
set<pair<pii, int> > yys;

long long ans;

int bmm(int a, int b)
{
  if (b)
    return bmm(b, a % b);
  return a;
}

pii norm(int a, int b)
{
  if (a < 0)
    a *= -1, b *= -1;
  if (a == 0)
    b = abs(b);
  int d = bmm(a, abs(b));
  return {a / d, b / d};
}

long long cc(long long a)
{
  return a * (a - 1) / 2;
}

int main()
{
  ios::sync_with_stdio(0); cin.tie(0);

  cin >> n;

  for (int i = 0; i < n; i ++)
    cin >> x[i] >> y[i];

  for (int i = 0; i < n; i ++)
    for (int j = 0; j < i; j ++)
      {
	pii c;
	int d;
	if (x[i] == x[j])
	  {
	    c = {1, 0};
	    d = x[i];
	  }
	else
	  {
	    c = norm(y[i] - y[j], x[i] - x[j]);
	    d = c.second * y[i] - c.first * x[i];
	  }
	if (yys.count({c, d}))
	  continue;
	ans -= ccs[c];
	ccs[c] ++;
	N ++;
      }

  ans += cc(N);

  cout << ans << endl;

  return 0;
}


//In the Name of God
//Ya Ali

#include <bits/stdc++.h>

#define pii pair<int, int>

#define err(A) cout << #A << " = " << (A) << endl

using namespace std;

const int maxn = 1024;

int x[maxn], y[maxn];

int n;
int N;

map<pii, int> ccs;
set<pair<pii, int> > yys;
set<int> ys;

long long ans;

int bmm(int a, int b)
{
  if (b)
    return bmm(b, a % b);
  return a;
}

pii norm(int a, int b)
{
  if (a < 0)
    a *= -1, b *= -1;
  if (a == 0)
    b = abs(b);
  int d = bmm(a, abs(b));
  return {a / d, b / d};
}

long long cc(int a)
{
  return 1ll * a * (a - 1) / 2;
}

int main()
{
  ios::sync_with_stdio(0); cin.tie(0);

  cin >> n;

  for (int i = 0; i < n; i ++)
    cin >> x[i] >> y[i];

  for (int i = 0; i < n; i ++)
    for (int j = 0; j < i; j ++)
      if (x[i] == x[j])
	{
	  ys.insert(x[i]);
	}
      else
	{
	  pii c = norm(y[i] - y[j], x[i] - x[j]);
	  int d = c.second * y[i] - c.first * x[i];
	  if (yys.count({c, d}))
	    continue;
	  ans -= ccs[c];
	  ccs[c] ++;
	  N ++;
	}

  N += ys.size();

  ans += cc(N);
  ans -= cc(ys.size());

  cout << ans << endl;

  return 0;
}


#include <bits/stdc++.h>

using namespace std;

int gcd (int a, int b)
{
    if (b==0)	return a;
    return gcd (b, a%b);
}

int main()
{
    int n;
    cin >> n;

    vector<pair<int,int>> in;

    for (int i=0; i<n; ++i)
    {
	int a, b;
	cin >> a >> b;
	in.push_back({a,b});
    }

    set< pair< pair<int, int>, int> > ss;
    for (int i=0; i<in.size(); ++i)
    {
	int x1 = in[i].first;
	int y1 = in[i].second;

	for (int j=0; j<in.size(); ++j)
	{
	    if (i == j) continue;

	    int x2 = in[j].first;
	    int y2 = in[j].second;

	    int a = y1 - y2;
	    int b = x1 - x2;
	    int c = (y1 * x2) - (x1 * y2);

	    int hcf = gcd(a, gcd(b, c));

	    a /= hcf;
	    b /= hcf;
	    c /= hcf;

	    ss.insert({{a, b}, c});
	}
    }

    int tlcnt = ss.size();
    //cout << "Total lines : " << tlcnt << '\n';

    int parallel = 0;
    map<pair<int, int>, int> mp;
    //set<pair<int, int>> s;
    for (auto &i: ss)
    {
	++mp[i.first];
	//if (s.find(i.first) != s.end())	++parallel;
	//else s.insert(i.first);
    }

    int cnt = 0;
    for(auto &m: mp)
    {
	cnt += (m.second * (m.second-1))/2;
    }

    //cout << "parallel lines: " << parallel << '\n';
    cout << (tlcnt*(tlcnt-1))/2 - cnt << '\n';
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int gcd (int a, int b)
{
    if (b==0)	return a;
    return gcd (b, a%b);
}

int main()
{
    int n;
    cin >> n;

    vector<pair<int,int>> in;

    for (int i=0; i<n; ++i)
    {
	int a, b;
	cin >> a >> b;
	in.push_back({a,b});
    }

    set< pair< pair<int, int>, int> > ss;
    for (int i=0; i<in.size(); ++i)
    {
	int x1 = in[i].first;
	int y1 = in[i].second;

	for (int j=0; j<in.size(); ++j)
	{
	    if (i == j) continue;

	    int x2 = in[j].first;
	    int y2 = in[j].second;

	    int a = y1 - y2;
	    int b = x1 - x2;
	    int c = (y1 * x2) - (x1 * y2);

	    int hcf = gcd(a, gcd(b, c));

	    a /= hcf;
	    b /= hcf;
	    c /= hcf;

	    ss.insert({{a, b}, c});
	}
    }

    int tlcnt = ss.size();
    //cout << "Total lines : " << tlcnt << '\n';

    int parallel = 0;
    set<pair<int, int>> s;
    for (auto &i: ss)
    {
	if (s.find(i.first) != s.end())	++parallel;
	else s.insert(i.first);
    }

    //cout << "parallel lines: " << parallel << '\n';
    cout << (tlcnt*(tlcnt-1))/2 - (parallel*(parallel+1))/2 << '\n';
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int gcd (int a, int b)
{
    if (a == 0)	return b;
    return gcd (b%a, a);
}

int main()
{
    int n;
    cin >> n;

    vector<pair<int,int>> in;

    for (int i=0; i<n; ++i)
    {
	int a, b;
	cin >> a >> b;
	in.push_back({a,b});
    }

    set <pair <pair <int, int>, int>> ss;
    for (int i=0; i<in.size(); ++i)
    {
	int x1 = in[i].first;
	int y1 = in[i].second;

	for (int j=i+1; j<in.size(); ++j)
	{
	    if (i == j) continue;

	    int x2 = in[j].first;
	    int y2 = in[j].second;

	    int a = y1 - y2;
	    int b = x1 - x2;

	    int hcf = gcd(a, b);

	    a /= hcf;
	    b /= hcf;

	    if (a < 0 || a == 0 && b < 0)
	    {
		a = -a;
		b = -b;
	    }

	    int c = a * x1 - b * y1;
	    ss.insert({{a, b}, c});
	}
    }

    long long tlcnt = ss.size();
    //cout << "Total lines : " << tlcnt << '\n';

    int parallel = 0;
    map<pair<int, int>, int> mp;
    //set<pair<int, int>> s;
    for (auto &i: ss)
    {
	++mp[i.first];
	//if (s.find(i.first) != s.end())	++parallel;
	//else s.insert(i.first);
    }

    long long cnt = 0;
    for(auto &m: mp)
    {
	//cout << "m.first : " << m.first.first << ", m.second: " << m.first.second << '\n';
	cnt += (m.second * (m.second-1))/2;
    }

    //cout << "cnt: " << cnt << '\n';
    cout << ((tlcnt*(tlcnt-1))/2 - cnt) << '\n';
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

int gcd (int a, int b)
{
    if (b==0)	return a;
    return gcd (b, a%b);
}

int main()
{
    int n;
    cin >> n;

    vector<pair<int,int>> in;

    for (int i=0; i<n; ++i)
    {
	int a, b;
	cin >> a >> b;
	in.push_back({a,b});
    }

    set< pair< pair<int, int>, int> > ss;
    for (int i=0; i<in.size(); ++i)
    {
	int x1 = in[i].first;
	int y1 = in[i].second;

	for (int j=0; j<in.size(); ++j)
	{
	    if (i == j) continue;

	    int x2 = in[j].first;
	    int y2 = in[j].second;

	    int a = y1 - y2;
	    int b = x1 - x2;
	    int c = (y1 * x2) - (x1 * y2);

	    int hcf = gcd(a, gcd(b, c));

	    a /= hcf;
	    b /= hcf;
	    c /= hcf;

	    ss.insert({{a, b}, c});
	}
    }

    int tlcnt = ss.size();
    //cout << "Total lines : " << tlcnt << '\n';

    int parallel = 0;
    set<pair<int, int>> s;
    for (auto &i: ss)
    {
	if (s.find(i.first) != s.end())	++parallel;
	else s.insert(i.first);
    }

    //cout << "parallel lines: " << parallel << '\n';
    cout << (tlcnt*(tlcnt-1))/2 - parallel << '\n';
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll gcd(ll a,ll b){
    return __gcd(a,b);
}
ll cr(ll n){
        return n*(n-1)/2;
}
int main(){
    ll n;
    cin>>n;
    vector<ll> x(n);
    vector<ll> y(n);
    for(ll i=0;i<n;i++){
        cin>>x[i];
        cin>>y[i];
    }
    ll ans=0;
    ans+=cr(n);
    map<pair<ll,ll>,ll> m;
    ll inf=0;
    for(ll i=0;i<n;i++){
        for(ll j=i+1;j<n;j++){
            ll a=y[j]-y[i];
            ll b=x[j]-x[i];
            ll g=gcd(a,b);
            a=a/g;
            b=b/g;
            if(b==0){
                inf++;
            }
            else{
                m[make_pair(a,b)]++;
            }
        }
    }
    auto it=m.begin();
    while(it!=m.end()){
            if(it->second>1){
                    ans-=cr(it->second);
            }
    }
    if(inf>1){
            ans-=cr(inf);
    }
    cout<<ans<<endl;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll gcd(ll a,ll b){
    return __gcd(a,b);
}
ll cr(ll n){
        return n*(n-1)/2;
}
int main(){
    ll n;
    cin>>n;
    vector<ll> x(n);
    vector<ll> y(n);
    for(ll i=0;i<n;i++){
        cin>>x[i];
        cin>>y[i];
    }
    ll ans=0;
    ans+=cr(n);
    map<pair<ll,ll>,ll> m;
    ll inf=0;
    for(ll i=0;i<n;i++){
        for(ll j=i+1;j<n;j++){
            ll a=y[j]-y[i];
            ll b=x[j]-x[i];
            ll g=gcd(a,b);
            a=a/g;
            b=b/g;
            if(b==0){
                inf++;
            }
            else{
                m[make_pair(a,b)]++;
            }
        }
    }
    auto it=m.begin();
    while(it!=m.end()){
            if(it->second>1){
                    an-=cr(it->second);
            }
    }
    if(inf>1){
            ans-=cr(inf);
    }
    cout<<ans<<endl;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll gcd(ll a,ll b){
    return __gcd(a,b);
}
ll cr(ll n){
        return n*(n-1)/2;
}
int main(){
    ll n;
    cin>>n;
    vector<ll> x(n);
    vector<ll> y(n);
    for(ll i=0;i<n;i++){
        cin>>x[i];
        cin>>y[i];
    }
    ll ans=0;
    ans+=cr(n);
    unordered_map<pair<ll,ll>,ll> m;
    ll inf=0;
    for(ll i=0;i<n;i++){
        for(ll j=i+1;j<n;j++){
            ll a=y[j]-y[i];
            ll b=x[j]-x[i];
            ll g=gcd(a,b);
            a=a/g;
            b=b/g;
            if(b==0){
                inf++;
            }
            else{
                m[make_pair(a,b)]++;
            }
        }
    }
    auto it=m.begin();
    while(it!=m.end()){
            if(it->second>1){
                    an-=cr(it->second);
            }
    }
    if(inf>1){
            ans-=cr(inf);
    }
    cout<<ans<<endl;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll gcd(ll a,ll b){
    return __gcd(a,b);
}
ll cr(ll n){
        return n*(n-1)/2;
}
int main(){
    ll n;
    cin>>n;
    vector<ll> x(n);
    vector<ll> y(n);
    for(ll i=0;i<n;i++){
        cin>>x[i];
        cin>>y[i];
    }
    ll ans=0;
    ans+=cr(cr(n));
    //cout<<ans<<endl;
    map<pair<ll,ll>,ll> m;
    ll inf=0;
    for(ll i=0;i<n;i++){
        for(ll j=i+1;j<n;j++){
            ll a=y[j]-y[i];
            ll b=x[j]-x[i];
            ll g=gcd(a,b);
            a=a/g;
            b=b/g;
            if(b==0){
                inf++;
            }
            else{
                m[make_pair(a,b)]++;
            }
        }
    }
    map<pair<ll,ll>,ll>::iterator it=m.begin();
    while(it!=m.end()){
            if(it->second>1){
                    ans-=cr(it->second);
            }
            it++;
    }
    if(inf>1){
            ans-=cr(inf);
    }
    cout<<ans<<endl;
}


#include <bits/stdc++.h>
using namespace std;

const int N=1005;
typedef long long ll;
int x[N],y[N],n;
set< pair<double,double> >s;
map<double,int>mp;

int main()
{
    scanf("%d",&n);
    for (int i=0;i<n;i++) scanf("%d%d",x+i,y+i);
    for (int i=0;i<n;i++)
        for (int j=i+1;j<n;j++)
    {
        double k;
        if(x[i]==x[j]) s.insert({1e18,x[i]});
        else
        {
            k=(double)(y[j]-y[i])/(x[j]-x[i]);
            s.insert({k,y[i]-k*x[i]});
        }
    }
    ll ans=0,tot=s.size();
    for (auto p:s) mp[p.first]++;
    for (auto p:mp) ans+=p.second*(tot-p.second);
    printf("%lld\n",ans>>1);
    return 0;
}


/**
▂▃▅▇█▓▒░۩۞۩ ۩۞۩░▒▓█▇▅▃▂
Make it happen now, not tomorrow.
Tomorrow is a  loser's excuse.
▂▃▅▇█▓▒░۩۞۩ ۩۞۩░▒▓█▇▅▃▂
**/
#ifndef _GLIbCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#if __cplu >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#include <cstring>
#endif

// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include<random>
#include <chrono>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#if __cplu >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <time.h>
#endif
#define __ ios_base::sync_with_stdio(false);cin.tie(NULL);
using namespace std;
// #define INF 0x7f7f7f7f
#define ull unsigned long long int
#define pii pair<int,int>
#define ll long long int
#define ld long double
#define MSET(x,y) memset(x,y,sizeof(x))
// #define l long
#define se second
#define AlphaSize 26
#define fi first
#define NIL 0
#define UNVISITED -1
#define EXPOLORED 0
#define mk make_pair
#define pb push_back
#define sc(n) scanf("%d",&n)
#define NIL 0
#define pii pair<int,int>
#define eps 1e-8
#define all(x) x.begin(),x.end()
#define me(u,v,w) make_pair(w,make_pair(u,v))
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define inrange(x,y,row,col) (x>=0 && y>=0 && x<row && y<col)
#define foreach(e, x) for(__typeof(x.begin()) e = x.begin(); e != x.end(); ++ e)
// #define add(a,b) (a + b >= MOD ? a+b-MOD:a+b)
#define hs(c1,c2) (256*min(c1,c2) + max(c1,c2))
typedef struct{ int sum,suf,pre,max;} Node;
int toint(const string &s) { stringstream ss; ss << s; int x; ss >> x; return x; }
const int MAXN = 2e5+100;
const int UP = 31;
// const ll inf = 1e18;
const int mod = 1e9+7;
const ll highest = 1e18;
// const int inf = 1e9+10;
// const double pi = 3.141592653589793238462643383;
const double pi = acos(-1);
const double Phi =  1.618033988749894;
const int logn = 20;
const double phi = 0.618033988749894;
const double root5 = 2.236067977;
const int inf = 1e9;
const int ini = -1e9;
const int N = 2e5+100;

/**
▂▃▅▇█▓▒░۩۞۩ ۩۞۩░▒▓█▇▅▃▂
Make it happen now, not tomorrow.
Tomorrow is a loser's excuse.
▂▃▅▇█▓▒░۩۞۩ ۩۞۩░▒▓█▇▅▃▂
**/
map<pair<int,int>,set<int> > mp;
std::vector<pair<int,int> > v;
ll gcd(ll a,ll b){
    if(b==0)return a;
    else return gcd(b,a%b);
}
int main(){
    int n;
    scanf("%d",&n);
    for(int i=0;i<n;++i){
        int x,y;
        scanf("%d%d",&x,&y);
        v.pb(mk(x,y));
    }
    //line = ax + by + c ==> c = -(ax+by);
    //slope = -a/b;
    //slope = (y2-y1)/(x2-x1);
    pair<int,int> p;
    pair<int,int> x;
    ll a,b,c;
    ll ans = 0;
    ll tot = 0;
    for(int i=0;i<n;++i){
        for(int j=i+1;j<n;++j){
            p = v[i];
            x = v[j];
            b = x.fi - p.fi;
            a = x.se - p.se;
            ll g = gcd(a,b);
            a /= g;
            b /= g;
            if(a<0 || (a==0 && b<0)){
                a = -a;
                b = -b;
            }
            pair<int,int> slp = mk(a,b);
            c = a*x.fi - b*x.se;
            c *= -1;
            if(!mp[slp].count(c)){
                mp[slp].insert(c);
                tot++;
                ans += tot - mp[slp].size();
            }
        }
    }
    cout<<ans<<endl;
    return 0;
}


/**
▂▃▅▇█▓▒░۩۞۩ ۩۞۩░▒▓█▇▅▃▂
Make it happen now, not tomorrow.
Tomorrow is a  loser's excuse.
▂▃▅▇█▓▒░۩۞۩ ۩۞۩░▒▓█▇▅▃▂
**/
#ifndef _GLIbCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#if __cplu >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#include <cstring>
#endif

// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include<random>
#include <chrono>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#if __cplu >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <time.h>
#endif
#define __ ios_base::sync_with_stdio(false);cin.tie(NULL);
using namespace std;
// #define INF 0x7f7f7f7f
#define ull unsigned long long int
#define pii pair<int,int>
#define ll long long int
#define ld long double
#define MSET(x,y) memset(x,y,sizeof(x))
// #define l long
#define se second
#define AlphaSize 26
#define fi first
#define NIL 0
#define UNVISITED -1
#define EXPOLORED 0
#define mk make_pair
#define pb push_back
#define sc(n) scanf("%d",&n)
#define NIL 0
#define pii pair<int,int>
#define eps 1e-8
#define all(x) x.begin(),x.end()
#define me(u,v,w) make_pair(w,make_pair(u,v))
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define inrange(x,y,row,col) (x>=0 && y>=0 && x<row && y<col)
#define foreach(e, x) for(__typeof(x.begin()) e = x.begin(); e != x.end(); ++ e)
// #define add(a,b) (a + b >= MOD ? a+b-MOD:a+b)
#define hs(c1,c2) (256*min(c1,c2) + max(c1,c2))
typedef struct{ int sum,suf,pre,max;} Node;
int toint(const string &s) { stringstream ss; ss << s; int x; ss >> x; return x; }
const int MAXN = 2e5+100;
const int UP = 31;
// const ll inf = 1e18;
const int mod = 1e9+7;
const ll highest = 1e18;
// const int inf = 1e9+10;
// const double pi = 3.141592653589793238462643383;
const double pi = acos(-1);
const double Phi =  1.618033988749894;
const int logn = 20;
const double phi = 0.618033988749894;
const double root5 = 2.236067977;
const int inf = 1e9;
const int N = 2e5+100;

/**
▂▃▅▇█▓▒░۩۞۩ ۩۞۩░▒▓█▇▅▃▂
Make it happen now, not tomorrow.
Tomorrow is a loser's excuse.
▂▃▅▇█▓▒░۩۞۩ ۩۞۩░▒▓█▇▅▃▂
**/
map<pair<int,int>,set<int> > mp;
std::vector<pair<int,int> > v;
ll gcd(ll a,ll b){
    if(b==0)return a;
    else return gcd(b,a%b);
}
int main(){
    int n;
    scanf("%d",&n);
    for(int i=0;i<n;++i){
        int x,y;
        scanf("%d%d",&x,&y);
        v.pb(mk(x,y));
    }
    //line = ax + by + c ==> c = -(ax+by);
    //slope = -a/b;
    //slope = (y2-y1)/(x2-x1);
    pair<int,int> p;
    pair<int,int> x;
    ll a,b,c;
    ll ans = 0;
    ll tot = 0;
    for(int i=0;i<n;++i){
        for(int j=i+1;j<n;++j){
            p = v[i];
            x = v[j];
            b = x.fi - p.fi;
            a = x.se - p.se;
            ll g = gcd(a,b);
            a /= g;
            b /= g;
            pair<int,int> slp = mk(a,b);
            c = -1*(a*p.fi + b*p.se);
            if(!mp[slp].count(c)){
                mp[slp].insert(c);
                tot++;
                ans += tot - mp[slp].size();
            }
        }
    }
    cout<<ans<<endl;
    return 0;
}


/**
▂▃▅▇█▓▒░۩۞۩ ۩۞۩░▒▓█▇▅▃▂
Make it happen now, not tomorrow.
Tomorrow is a  loser's excuse.
▂▃▅▇█▓▒░۩۞۩ ۩۞۩░▒▓█▇▅▃▂
**/
#ifndef _GLIbCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#if __cplu >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#include <cstring>
#endif

// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include<random>
#include <chrono>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#if __cplu >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <time.h>
#endif
#define __ ios_base::sync_with_stdio(false);cin.tie(NULL);
using namespace std;
// #define INF 0x7f7f7f7f
#define ull unsigned long long int
#define pii pair<int,int>
#define ll long long int
#define ld long double
#define MSET(x,y) memset(x,y,sizeof(x))
// #define l long
#define se second
#define AlphaSize 26
#define fi first
#define NIL 0
#define UNVISITED -1
#define EXPOLORED 0
#define mk make_pair
#define pb push_back
#define sc(n) scanf("%d",&n)
#define NIL 0
#define pii pair<int,int>
#define eps 1e-8
#define all(x) x.begin(),x.end()
#define me(u,v,w) make_pair(w,make_pair(u,v))
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define inrange(x,y,row,col) (x>=0 && y>=0 && x<row && y<col)
#define foreach(e, x) for(__typeof(x.begin()) e = x.begin(); e != x.end(); ++ e)
// #define add(a,b) (a + b >= MOD ? a+b-MOD:a+b)
#define hs(c1,c2) (256*min(c1,c2) + max(c1,c2))
typedef struct{ int sum,suf,pre,max;} Node;
int toint(const string &s) { stringstream ss; ss << s; int x; ss >> x; return x; }
const int MAXN = 2e5+100;
const int UP = 31;
// const ll inf = 1e18;
const int mod = 1e9+7;
const ll highest = 1e18;
// const int inf = 1e9+10;
// const double pi = 3.141592653589793238462643383;
const double pi = acos(-1);
const double Phi =  1.618033988749894;
const int logn = 20;
const double phi = 0.618033988749894;
const double root5 = 2.236067977;
const int inf = 1e9;
const int ini = -1e9;
const int N = 2e5+100;

/**
▂▃▅▇█▓▒░۩۞۩ ۩۞۩░▒▓█▇▅▃▂
Make it happen now, not tomorrow.
Tomorrow is a loser's excuse.
▂▃▅▇█▓▒░۩۞۩ ۩۞۩░▒▓█▇▅▃▂
**/
map<pair<int,int>,set<int> > mp;
std::vector<pair<int,int> > v;
ll gcd(ll a,ll b){
    if(b==0)return a;
    else return gcd(b,a%b);
}
int main(){
    int n;
    scanf("%d",&n);
    for(int i=0;i<n;++i){
        int x,y;
        scanf("%d%d",&x,&y);
        v.pb(mk(x,y));
    }
    //line = ax + by + c ==> c = -(ax+by);
    //slope = -a/b;
    //slope = (y2-y1)/(x2-x1);
    pair<int,int> p;
    pair<int,int> x;
    ll a,b,c;
    ll ans = 0;
    ll tot = 0;
    for(int i=0;i<n;++i){
        for(int j=i+1;j<n;++j){
            p = v[i];
            x = v[j];
            b = x.fi - p.fi;
            a = x.se - p.se;
            ll g = gcd(a,b);
            a /= g;
            b /= g;
            // if(a<0 || (a==0 && b<0)){
            //     a = -a;
            //     b = -b;
            // }
            pair<int,int> slp = mk(a,b);
            c = a*x.fi + b*x.se;
            c *= -1;
            if(!mp[slp].count(c)){
                mp[slp].insert(c);
                tot++;
                ans += tot - mp[slp].size();
            }
        }
    }
    cout<<ans<<endl;
    return 0;
}


/**
▂▃▅▇█▓▒░۩۞۩ ۩۞۩░▒▓█▇▅▃▂
Make it happen now, not tomorrow.
Tomorrow is a  loser's excuse.
▂▃▅▇█▓▒░۩۞۩ ۩۞۩░▒▓█▇▅▃▂
**/
#ifndef _GLIbCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#if __cplu >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#include <cstring>
#endif

// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include<random>
#include <chrono>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#if __cplu >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <time.h>
#endif
#define __ ios_base::sync_with_stdio(false);cin.tie(NULL);
using namespace std;
// #define INF 0x7f7f7f7f
#define ull unsigned long long int
#define pii pair<int,int>
#define ll long long int
#define ld long double
#define MSET(x,y) memset(x,y,sizeof(x))
// #define l long
#define se second
#define AlphaSize 26
#define fi first
#define NIL 0
#define UNVISITED -1
#define EXPOLORED 0
#define mk make_pair
#define pb push_back
#define sc(n) scanf("%d",&n)
#define NIL 0
#define pii pair<int,int>
#define eps 1e-8
#define all(x) x.begin(),x.end()
#define me(u,v,w) make_pair(w,make_pair(u,v))
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define inrange(x,y,row,col) (x>=0 && y>=0 && x<row && y<col)
#define foreach(e, x) for(__typeof(x.begin()) e = x.begin(); e != x.end(); ++ e)
// #define add(a,b) (a + b >= MOD ? a+b-MOD:a+b)
#define hs(c1,c2) (256*min(c1,c2) + max(c1,c2))
typedef struct{ int sum,suf,pre,max;} Node;
int toint(const string &s) { stringstream ss; ss << s; int x; ss >> x; return x; }
const int MAXN = 2e5+100;
const int UP = 31;
// const ll inf = 1e18;
const int mod = 1e9+7;
const ll highest = 1e18;
// const int inf = 1e9+10;
// const double pi = 3.141592653589793238462643383;
const double pi = acos(-1);
const double Phi =  1.618033988749894;
const int logn = 20;
const double phi = 0.618033988749894;
const double root5 = 2.236067977;
const int inf = 1e9;
const int ini = -1e9;
const int N = 2e5+100;

/**
▂▃▅▇█▓▒░۩۞۩ ۩۞۩░▒▓█▇▅▃▂
Make it happen now, not tomorrow.
Tomorrow is a loser's excuse.
▂▃▅▇█▓▒░۩۞۩ ۩۞۩░▒▓█▇▅▃▂
**/
map<pair<int,int>,set<int> > mp;
std::vector<pair<int,int> > v;
ll gcd(ll a,ll b){
    if(b==0)return a;
    else return gcd(b,a%b);
}
int main(){
    int n;
    scanf("%d",&n);
    for(int i=0;i<n;++i){
        int x,y;
        scanf("%d%d",&x,&y);
        v.pb(mk(x,y));
    }
    //line = ax + by + c ==> c = -(ax+by);
    //slope = -a/b;
    //slope = (y2-y1)/(x2-x1);
    pair<int,int> p;
    pair<int,int> x;
    ll a,b,c;
    ll ans = 0;
    ll tot = 0;
    for(int i=0;i<n;++i){
        for(int j=i+1;j<n;++j){
            p = v[i];
            x = v[j];
            b = x.fi - p.fi;
            a = x.se - p.se;
            ll g = gcd(a,b);
            a /= g;
            b /= g;
            pair<int,int> slp = mk(a,b);
            if(b==0){
                c = ini;
            }else{
                c = -1*(a*p.fi + b*p.se);
            }
            // c = -1*(a*p.fi + b*p.se);
            if(!mp[slp].count(c)){
                mp[slp].insert(c);
                tot++;
                ans += tot - mp[slp].size();
            }
        }
    }
    cout<<ans<<endl;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define PI 3.1415926535897932
#define ms(s, n) memset(s, n, sizeof(s))
#define prec(n) fixed<<setprecision(n)
#define eps 0.000001
#define all(v) v.begin(), v.end()
#define bolt ios::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define forr(i,p,n) for(int i=p;i<n;i++)
#define sz(x) ((int)(x).size())
#define _USE_MATH_DEFINES
typedef long long ll;
typedef unsigned long long ull;

ll mult(ll a,ll b, ll p=MOD){ll ans = a; ans *= b; return ((ans >= p) ? ans % p : ans);}
ll add(ll a, ll b, ll p=MOD){ll ans = a + b; return ((ans >= p) ? ans - p : ans);}
ll fpow(ll n, ll k, ll p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n%p; n = n * n%p;} return r;}
ll inv(ll a, ll p = MOD) {return fpow(a, p - 2, p);}

// ncr mod p
// vector<ll> fact(200005,0);
// vector<ll> invvec(200005,0);

// void fillfact(){
//     fact[0] = 1; invvec[0] = 1;
//     fact[1] = 1; invvec[1] = 1;
//     forr(i,2,200001){
//         fact[i] = mult(fact[i-1],i);
//         invvec[i] = inv(fact[i]);
//     }
// }

// ll ncr(ll n, ll r){
//     return (mult(fact[n],mult(invvec[r],invvec[n-r])));
// }

// disjoint sets union
// vector<ll> par(200005,0);
// vector<ll> rnk(200005,0);
// ll find_root(ll v) {
//     return par[v] == v ? v : (par[v] = find_root(par[v]));
// }

// void merge(ll x,ll y) {
//     if ((x = find_root(x)) == (y = find_root(y))) return;
//     if(rnk[y] > rnk[x])
//         swap(x, y);
//     par[y] = x;
//     rnk[x] += rnk[y];
// }

// sieve for first 1000 primes
// vector<bool> prime(100005,0);
// vector<int> vec;

// void sieve() {
//     forr(i, 2, 8005) {
//         if (!prime[i]) {
//             vec.pb(i);
//             for(int j = 2 * i; j < prime.size(); j += i)
//                 prime[j] = 1;
//         }
//     }
// }

int n;
int a, b;

int main(){
    bolt;
    cin >> n;
    vector<vector<int> > points(n, vector<int>(2));
    vector<vector<int> > arr;

    forr(i,0,n)
    	cin >> points[i][0] >> points[i][1];

    forr(i,0,n){
        forr(j,i+1,n){
            vector<int> temp(3);
            temp[0] = points[i][1] - points[j][1];
            temp[1] = points[i][0] - points[j][0];
            if(temp[1] < 0){
                temp[0] = -temp[0];
                temp[1] = abs(temp[1]);
            }
            temp[2] = (points[i][1]*points[j][0]) -
                      (points[i][0]*points[j][1]);
            int gcd1 = __gcd(temp[0],temp[1]);
            int gcd2 = __gcd(gcd1,temp[2]);
            if(gcd2 != 0){
                temp[0] /= gcd2; temp[1] /= gcd2; temp[2] /= gcd2;
            }
            // gcd1 = __gcd(temp[0],temp[1]);
            // if(gcd1 != 0){
            //     temp[0] /= gcd1; temp[1] /= gcd1;
            // }
            arr.pb(temp);
        }
    }
    sort(all(arr));
    vector<vector<int> > newarr;
    newarr.pb(arr[0]);
    int nc = 0;
    forr(i,1,sz(arr)){
        if(arr[i] != newarr[nc]){
            newarr.pb(arr[i]);
            nc++;
        }
    }

    for(auto &temp : newarr){
        int gcd1 = __gcd(temp[0],temp[1]);
        if(gcd1 != 0){
            temp[0] /= gcd1; temp[1] /= gcd1;
        }
    }

    sort(all(newarr));

    // cout << endl;
    // for(auto &e : newarr){
    //     cout << e[0] << " " << e[1] << " " << e[2] << endl;
    // }
    // cout << endl;

    int s = sz(newarr);
    int ans = (s*(s-1))/2;
    for(int i = 0; i < s; ){
        int c = 1;
        int j;
        for(j = i+1; j < s; ++j){
            if(!(newarr[j][0] == newarr[i][0] and newarr[j][1] == newarr[i][1]))
                break;
            c++;
        }
        ans -= ((c*(c-1))/2);
        i = j;
    }
    cout << ans << endl;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define PI 3.1415926535897932
#define ms(s, n) memset(s, n, sizeof(s))
#define prec(n) fixed<<setprecision(n)
#define eps 0.000001
#define all(v) v.begin(), v.end()
#define bolt ios::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define forr(i,p,n) for(int i=p;i<n;i++)
#define sz(x) ((int)(x).size())
#define _USE_MATH_DEFINES
typedef long long ll;
typedef unsigned long long ull;

ll mult(ll a,ll b, ll p=MOD){ll ans = a; ans *= b; return ((ans >= p) ? ans % p : ans);}
ll add(ll a, ll b, ll p=MOD){ll ans = a + b; return ((ans >= p) ? ans - p : ans);}
ll fpow(ll n, ll k, ll p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n%p; n = n * n%p;} return r;}
ll inv(ll a, ll p = MOD) {return fpow(a, p - 2, p);}

// ncr mod p
// vector<ll> fact(200005,0);
// vector<ll> invvec(200005,0);

// void fillfact(){
//     fact[0] = 1; invvec[0] = 1;
//     fact[1] = 1; invvec[1] = 1;
//     forr(i,2,200001){
//         fact[i] = mult(fact[i-1],i);
//         invvec[i] = inv(fact[i]);
//     }
// }

// ll ncr(ll n, ll r){
//     return (mult(fact[n],mult(invvec[r],invvec[n-r])));
// }

// disjoint sets union
// vector<ll> par(200005,0);
// vector<ll> rnk(200005,0);
// ll find_root(ll v) {
//     return par[v] == v ? v : (par[v] = find_root(par[v]));
// }

// void merge(ll x,ll y) {
//     if ((x = find_root(x)) == (y = find_root(y))) return;
//     if(rnk[y] > rnk[x])
//         swap(x, y);
//     par[y] = x;
//     rnk[x] += rnk[y];
// }

// sieve for first 1000 primes
// vector<bool> prime(100005,0);
// vector<int> vec;

// void sieve() {
//     forr(i, 2, 8005) {
//         if (!prime[i]) {
//             vec.pb(i);
//             for(int j = 2 * i; j < prime.size(); j += i)
//                 prime[j] = 1;
//         }
//     }
// }

int n;
int a, b;

int main(){
    bolt;
    cin >> n;
    vector<vector<int> > points(n, vector<int>(2));
    vector<vector<int> > arr;

    forr(i,0,n)
    	cin >> points[i][0] >> points[i][1];

    forr(i,0,n){
        forr(j,i+1,n){
            vector<int> temp(3);
            temp[0] = points[i][1] - points[j][1];
            temp[1] = points[i][0] - points[j][0];
            if(temp[1] < 0){
                temp[0] = -temp[0];
                temp[1] = abs(temp[1]);
            }
            temp[2] = (points[i][1]*points[j][0]) -
                      (points[i][0]*points[j][1]);
            int gcds = __gcd(temp[0],temp[1]);
            if(gcds != 0){
                temp[0] /= gcds;
                temp[1] /= gcds;
            }
            arr.pb(temp);
        }
    }
    sort(all(arr));
    vector<vector<int> > newarr;
    newarr.pb(arr[0]);
    int nc = 0;
    forr(i,1,sz(arr)){
        if(arr[i] != newarr[nc]){
            newarr.pb(arr[i]);
            nc++;
        }
    }

    int s = sz(newarr);
    int ans = (s*(s-1))/2;
    for(int i = 0; i < s; ){
        int c = 1;
        int j;
        for(j = i+1; j < s; ++j){
            if(!(newarr[j][0] == newarr[i][0] and newarr[j][1] == newarr[i][1]))
                break;
            c++;
        }
        ans -= ((c*(c-1))/2);
        i = j;
    }
    cout << ans << endl;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define PI 3.1415926535897932
#define ms(s, n) memset(s, n, sizeof(s))
#define prec(n) fixed<<setprecision(n)
#define eps 0.000001
#define all(v) v.begin(), v.end()
#define bolt ios::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define forr(i,p,n) for(int i=p;i<n;i++)
#define sz(x) ((int)(x).size())
#define _USE_MATH_DEFINES
typedef long long ll;
typedef unsigned long long ull;

ll mult(ll a,ll b, ll p=MOD){ll ans = a; ans *= b; return ((ans >= p) ? ans % p : ans);}
ll add(ll a, ll b, ll p=MOD){ll ans = a + b; return ((ans >= p) ? ans - p : ans);}
ll fpow(ll n, ll k, ll p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n%p; n = n * n%p;} return r;}
ll inv(ll a, ll p = MOD) {return fpow(a, p - 2, p);}

// ncr mod p
// vector<ll> fact(200005,0);
// vector<ll> invvec(200005,0);

// void fillfact(){
//     fact[0] = 1; invvec[0] = 1;
//     fact[1] = 1; invvec[1] = 1;
//     forr(i,2,200001){
//         fact[i] = mult(fact[i-1],i);
//         invvec[i] = inv(fact[i]);
//     }
// }

// ll ncr(ll n, ll r){
//     return (mult(fact[n],mult(invvec[r],invvec[n-r])));
// }

// disjoint sets union
// vector<ll> par(200005,0);
// vector<ll> rnk(200005,0);
// ll find_root(ll v) {
//     return par[v] == v ? v : (par[v] = find_root(par[v]));
// }

// void merge(ll x,ll y) {
//     if ((x = find_root(x)) == (y = find_root(y))) return;
//     if(rnk[y] > rnk[x])
//         swap(x, y);
//     par[y] = x;
//     rnk[x] += rnk[y];
// }

// sieve for first 1000 primes
// vector<bool> prime(100005,0);
// vector<int> vec;

// void sieve() {
//     forr(i, 2, 8005) {
//         if (!prime[i]) {
//             vec.pb(i);
//             for(int j = 2 * i; j < prime.size(); j += i)
//                 prime[j] = 1;
//         }
//     }
// }

int n;
int a, b;

int main(){
    bolt;
    cin >> n;
    vector<vector<int> > points(n, vector<int>(2));
    vector<vector<int> > arr;

    forr(i,0,n)
    	cin >> points[i][0] >> points[i][1];

    forr(i,0,n){
        forr(j,i+1,n){
            vector<int> temp(3);
            temp[0] = points[i][1] - points[j][1];
            temp[1] = points[i][0] - points[j][0];
            if(temp[1] < 0){
                temp[0] = -temp[0];
                temp[1] = abs(temp[1]);
            }
            temp[2] = (points[i][1]*points[j][0]) -
                      (points[i][0]*points[j][1]);
            int gcds = __gcd(temp[0],temp[1]);
            if(gcds != 0){
                temp[0] /= gcds;
                temp[1] /= gcds;
                temp[2] /= gcds;
            }
            arr.pb(temp);
        }
    }
    sort(all(arr));
    vector<vector<int> > newarr;
    newarr.pb(arr[0]);
    int nc = 0;
    forr(i,1,sz(arr)){
        if(arr[i] != newarr[nc]){
            newarr.pb(arr[i]);
            nc++;
        }
    }

    int s = sz(newarr);
    int ans = (s*(s-1))/2;
    for(int i = 0; i < s; ){
        int c = 1;
        int j;
        for(j = i+1; j < s; ++j){
            if(!(newarr[j][0] == newarr[i][0] and newarr[j][1] == newarr[i][1]))
                break;
            c++;
        }
        ans -= ((c*(c-1))/2);
        i = j;
    }
    cout << ans << endl;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define PI 3.1415926535897932
#define ms(s, n) memset(s, n, sizeof(s))
#define prec(n) fixed<<setprecision(n)
#define eps 0.000001
#define all(v) v.begin(), v.end()
#define bolt ios::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define forr(i,p,n) for(int i=p;i<n;i++)
#define sz(x) ((int)(x).size())
#define _USE_MATH_DEFINES
typedef long long ll;
typedef unsigned long long ull;

ll mult(ll a,ll b, ll p=MOD){ll ans = a; ans *= b; return ((ans >= p) ? ans % p : ans);}
ll add(ll a, ll b, ll p=MOD){ll ans = a + b; return ((ans >= p) ? ans - p : ans);}
ll fpow(ll n, ll k, ll p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n%p; n = n * n%p;} return r;}
ll inv(ll a, ll p = MOD) {return fpow(a, p - 2, p);}

// ncr mod p
// vector<ll> fact(200005,0);
// vector<ll> invvec(200005,0);

// void fillfact(){
//     fact[0] = 1; invvec[0] = 1;
//     fact[1] = 1; invvec[1] = 1;
//     forr(i,2,200001){
//         fact[i] = mult(fact[i-1],i);
//         invvec[i] = inv(fact[i]);
//     }
// }

// ll ncr(ll n, ll r){
//     return (mult(fact[n],mult(invvec[r],invvec[n-r])));
// }

// disjoint sets union
// vector<ll> par(200005,0);
// vector<ll> rnk(200005,0);
// ll find_root(ll v) {
//     return par[v] == v ? v : (par[v] = find_root(par[v]));
// }

// void merge(ll x,ll y) {
//     if ((x = find_root(x)) == (y = find_root(y))) return;
//     if(rnk[y] > rnk[x])
//         swap(x, y);
//     par[y] = x;
//     rnk[x] += rnk[y];
// }

// sieve for first 1000 primes
// vector<bool> prime(100005,0);
// vector<int> vec;

// void sieve() {
//     forr(i, 2, 8005) {
//         if (!prime[i]) {
//             vec.pb(i);
//             for(int j = 2 * i; j < prime.size(); j += i)
//                 prime[j] = 1;
//         }
//     }
// }

int n;
int a, b;

int main(){
    bolt;
    cin >> n;
    vector<vector<int> > points(n, vector<int>(2));
    vector<vector<int> > arr;

    forr(i,0,n)
    	cin >> points[i][0] >> points[i][1];

    forr(i,0,n){
        forr(j,i+1,n){
            vector<int> temp(3);
            temp[0] = points[i][1] - points[j][1];
            temp[1] = points[i][0] - points[j][0];
            temp[2] = (points[i][1]*points[j][0]) -
                      (points[i][0]*points[j][1]);
            if(temp[2] < 0){
                temp[0] = -temp[0];
                temp[1] = -temp[1];
                temp[2] = -temp[2];
            }
            int gcd1 = __gcd(temp[0],temp[1]);
            int gcd2 = __gcd(gcd1,temp[2]);
            if(gcd2 != 0){
                temp[0] /= gcd2; temp[1] /= gcd2; temp[2] /= gcd2;
            }
            // gcd1 = __gcd(temp[0],temp[1]);
            // if(gcd1 != 0){
            //     temp[0] /= gcd1; temp[1] /= gcd1;
            // }
            arr.pb(temp);
        }
    }
    sort(all(arr));
    vector<vector<int> > newarr;
    newarr.pb(arr[0]);
    int nc = 0;
    forr(i,1,sz(arr)){
        if(arr[i] != newarr[nc]){
            newarr.pb(arr[i]);
            nc++;
        }
    }

    for(auto &temp : newarr){
        if(temp[1] < 0){
            temp[0] = -temp[0];
            temp[1] = -temp[1];
        }
        int gcd1 = __gcd(temp[0],temp[1]);
        if(gcd1 != 0){
            temp[0] /= gcd1; temp[1] /= gcd1;
        }
    }

    sort(all(newarr));

    // cout << endl;
    // for(auto &e : newarr){
    //     cout << e[0] << " " << e[1] << " " << e[2] << endl;
    // }
    // cout << endl;

    int s = sz(newarr);
    int ans = (s*(s-1))/2;
    for(int i = 0; i < s; ){
        int c = 1;
        int j;
        for(j = i+1; j < s; ++j){
            if(!(newarr[j][0] == newarr[i][0] and newarr[j][1] == newarr[i][1]))
                break;
            c++;
        }
        ans -= ((c*(c-1))/2);
        i = j;
    }
    cout << ans << endl;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define PI 3.1415926535897932
#define ms(s, n) memset(s, n, sizeof(s))
#define prec(n) fixed<<setprecision(n)
#define eps 0.000001
#define all(v) v.begin(), v.end()
#define bolt ios::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define forr(i,p,n) for(int i=p;i<n;i++)
#define sz(x) ((int)(x).size())
#define _USE_MATH_DEFINES
typedef long long ll;
typedef unsigned long long ull;

ll mult(ll a,ll b, ll p=MOD){ll ans = a; ans *= b; return ((ans >= p) ? ans % p : ans);}
ll add(ll a, ll b, ll p=MOD){ll ans = a + b; return ((ans >= p) ? ans - p : ans);}
ll fpow(ll n, ll k, ll p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n%p; n = n * n%p;} return r;}
ll inv(ll a, ll p = MOD) {return fpow(a, p - 2, p);}

// ncr mod p
// vector<ll> fact(200005,0);
// vector<ll> invvec(200005,0);

// void fillfact(){
//     fact[0] = 1; invvec[0] = 1;
//     fact[1] = 1; invvec[1] = 1;
//     forr(i,2,200001){
//         fact[i] = mult(fact[i-1],i);
//         invvec[i] = inv(fact[i]);
//     }
// }

// ll ncr(ll n, ll r){
//     return (mult(fact[n],mult(invvec[r],invvec[n-r])));
// }

// disjoint sets union
// vector<ll> par(200005,0);
// vector<ll> rnk(200005,0);
// ll find_root(ll v) {
//     return par[v] == v ? v : (par[v] = find_root(par[v]));
// }

// void merge(ll x,ll y) {
//     if ((x = find_root(x)) == (y = find_root(y))) return;
//     if(rnk[y] > rnk[x])
//         swap(x, y);
//     par[y] = x;
//     rnk[x] += rnk[y];
// }

// sieve for first 1000 primes
// vector<bool> prime(100005,0);
// vector<int> vec;

// void sieve() {
//     forr(i, 2, 8005) {
//         if (!prime[i]) {
//             vec.pb(i);
//             for(int j = 2 * i; j < prime.size(); j += i)
//                 prime[j] = 1;
//         }
//     }
// }

int n;
int a, b;

int main(){
    bolt;
    cin >> n;
    vector<vector<int> > points(n, vector<int>(2));
    vector<vector<int> > arr;

    forr(i,0,n)
    	cin >> points[i][0] >> points[i][1];

    forr(i,0,n){
        forr(j,i+1,n){
            vector<int> temp(3);
            temp[0] = points[i][1] - points[j][1];
            temp[1] = points[i][0] - points[j][0];
            if(temp[1] < 0){
                temp[0] = -temp[0];
                temp[1] = abs(temp[1]);
            }
            temp[2] = (points[i][1]*points[j][0]) -
                      (points[i][0]*points[j][1]);
            int gcds = __gcd(temp[0],__gcd(temp[1],temp[2]));
            if(gcds != 0){
                temp[0] /= gcds;
                temp[1] /= gcds;
                temp[2] /= gcds;
            }
            arr.pb(temp);
        }
    }
    sort(all(arr));
    vector<vector<int> > newarr;
    newarr.pb(arr[0]);
    int nc = 0;
    forr(i,1,sz(arr)){
        if(arr[i] != newarr[nc]){
            newarr.pb(arr[i]);
            nc++;
        }
    }

    // cout << endl;
    // for(auto &e : newarr){
    //     cout << e[0] << " " << e[1] << " " << e[2] << endl;
    // }
    // cout << endl;

    int s = sz(newarr);
    int ans = (s*(s-1))/2;
    for(int i = 0; i < s; ){
        int c = 1;
        int j;
        for(j = i+1; j < s; ++j){
            if(!(newarr[j][0] == newarr[i][0] and newarr[j][1] == newarr[i][1]))
                break;
            c++;
        }
        ans -= ((c*(c-1))/2);
        i = j;
    }
    cout << ans << endl;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define PI 3.1415926535897932
#define ms(s, n) memset(s, n, sizeof(s))
#define prec(n) fixed<<setprecision(n)
#define eps 0.000001
#define all(v) v.begin(), v.end()
#define bolt ios::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define forr(i,p,n) for(int i=p;i<n;i++)
#define sz(x) ((int)(x).size())
#define _USE_MATH_DEFINES
typedef long long ll;
typedef unsigned long long ull;

ll mult(ll a,ll b, ll p=MOD){ll ans = a; ans *= b; return ((ans >= p) ? ans % p : ans);}
ll add(ll a, ll b, ll p=MOD){ll ans = a + b; return ((ans >= p) ? ans - p : ans);}
ll fpow(ll n, ll k, ll p = MOD) {ll r = 1; for (; k; k >>= 1) {if (k & 1) r = r * n%p; n = n * n%p;} return r;}
ll inv(ll a, ll p = MOD) {return fpow(a, p - 2, p);}

// ncr mod p
// vector<ll> fact(200005,0);
// vector<ll> invvec(200005,0);

// void fillfact(){
//     fact[0] = 1; invvec[0] = 1;
//     fact[1] = 1; invvec[1] = 1;
//     forr(i,2,200001){
//         fact[i] = mult(fact[i-1],i);
//         invvec[i] = inv(fact[i]);
//     }
// }

// ll ncr(ll n, ll r){
//     return (mult(fact[n],mult(invvec[r],invvec[n-r])));
// }

// disjoint sets union
// vector<ll> par(200005,0);
// vector<ll> rnk(200005,0);
// ll find_root(ll v) {
//     return par[v] == v ? v : (par[v] = find_root(par[v]));
// }

// void merge(ll x,ll y) {
//     if ((x = find_root(x)) == (y = find_root(y))) return;
//     if(rnk[y] > rnk[x])
//         swap(x, y);
//     par[y] = x;
//     rnk[x] += rnk[y];
// }

// sieve for first 1000 primes
// vector<bool> prime(100005,0);
// vector<int> vec;

// void sieve() {
//     forr(i, 2, 8005) {
//         if (!prime[i]) {
//             vec.pb(i);
//             for(int j = 2 * i; j < prime.size(); j += i)
//                 prime[j] = 1;
//         }
//     }
// }

int n;
int a, b;

int main(){
    bolt;
    cin >> n;
    vector<vector<int> > points(n, vector<int>(2));
    vector<vector<int> > arr;

    forr(i,0,n)
    	cin >> points[i][0] >> points[i][1];

    forr(i,0,n){
        forr(j,i+1,n){
            vector<int> temp(3);
            temp[0] = points[i][1] - points[j][1];
            temp[1] = points[i][0] - points[j][0];
            if(temp[1] < 0){
                temp[0] = -temp[0];
                temp[1] = abs(temp[1]);
            }
            temp[2] = (points[i][1]*points[j][0]) -
                      (points[i][0]*points[j][1]);
            int gcd1 = __gcd(temp[0],temp[1]);
            int gcd2 = __gcd(gcd1,temp[2]);
            if(gcd2 != 0){
                temp[0] /= gcd2; temp[1] /= gcd2; temp[2] /= gcd2;
            }
            gcd1 = __gcd(temp[0],temp[1]);
            if(gcd1 != 0){
                temp[0] /= gcd1; temp[1] /= gcd1;
            }
            arr.pb(temp);
        }
    }
    sort(all(arr));
    vector<vector<int> > newarr;
    newarr.pb(arr[0]);
    int nc = 0;
    forr(i,1,sz(arr)){
        if(arr[i] != newarr[nc]){
            newarr.pb(arr[i]);
            nc++;
        }
    }

    // cout << endl;
    // for(auto &e : newarr){
    //     cout << e[0] << " " << e[1] << " " << e[2] << endl;
    // }
    // cout << endl;

    int s = sz(newarr);
    int ans = (s*(s-1))/2;
    for(int i = 0; i < s; ){
        int c = 1;
        int j;
        for(j = i+1; j < s; ++j){
            if(!(newarr[j][0] == newarr[i][0] and newarr[j][1] == newarr[i][1]))
                break;
            c++;
        }
        ans -= ((c*(c-1))/2);
        i = j;
    }
    cout << ans << endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define INF 10000004537.01
int main()
{

	int n;
	cin >> n;
	vector <pair <long double,long double>> pa(n);
	for(auto &y : pa)
		cin >> y.first  >> y.second;

	map< long double , set < long double > >  ma;
	for(int x= 0;x <n; x++)
	{
		for(int y =x +1; y < n; y++)
		{
			long double m, i ;
			if(pa[x].first == pa[y].first)
				ma[INF].insert(pa[x].first);
			else
			{
				m = pa[y].second - pa[x].second ;
				m/= pa[y].first - pa[x].first;
				if(pa[x].second == pa[y].second)
					ma[m].insert(pa[x].second);
				else

				ma[m].insert(pa[x].first  - pa[x].second / m );
			}
		}
	}

	long long  x1 = 0, x2 = 0;

	for(auto r : ma)
	{

	  long long
	   j = r.second.size();
	  x1 += j;
	  x2 += j * (j -1) / 2;
	}
	cout << (x1 * (x1 - 1) / 2) - x2 ;
}


#include<bits/stdc++.h>
using namespace std;
#define INF 100000000007.000
int main()
{

	int n;
	cin >> n;
	vector <pair < double,double>> pa(n);
	for(auto &y : pa)
		cin >> y.first  >> y.second;

	map< double , set <  double > >  ma;
	for(int x= 0;x <n; x++)
	{
		for(int y =x +1; y < n; y++)
		{
			double m, i ;
			if(pa[x].first == pa[y].first)
				ma[INF].insert(pa[x].first);
			else
			{
				m = pa[y].second - pa[x].second ;
				m/= pa[y].first - pa[x].first;
				if(pa[x].second == pa[y].second)
					ma[m].insert(pa[x].second);
				else

				ma[m].insert(pa[x].first  - pa[x].second / m );
			}
		}
	}

	long long x1 = 0, x2 = 0;

	for(auto r : ma)
	{

	  long long
	   j = r.second.size();
	  x1 += j;
	  x2 += j * (j -1) / 2;
	}
	cout << (x1 * (x1 - 1) / 2) - x2 ;
}


#include<bits/stdc++.h>
using namespace std;
#define INF 100000000007.090
int main()
{

	int n;
	cin >> n;
	vector <pair <long double,long double>> pa(n);
	for(auto &y : pa)
		cin >> y.first  >> y.second;

	map< long double , set < long double > >  ma;
	for(int x= 0;x <n; x++)
	{
		for(int y =x +1; y < n; y++)
		{
			long double m, i ;
			if(pa[x].first == pa[y].first)
				ma[INF].insert(pa[x].first);
			else
			{
				m = pa[y].second - pa[x].second ;
				m/= pa[y].first - pa[x].first;
				if(pa[x].second == pa[y].second)
					ma[m].insert(pa[x].second);
				else

				ma[m].insert(pa[x].first  - pa[x].second / m );
			}
		}
	}

	long long  x1 = 0, x2 = 0;

	for(auto r : ma)
	{

	  long long
	   j = r.second.size();
	  x1 += j;
	  x2 += j * (j -1) / 2;
	}
	cout << (x1 * (x1 - 1) / 2) - x2 ;
}


#include<bits/stdc++.h>
using namespace std;
#define INF 1000000009
int main()
{

	int n;
	cin >> n;
	vector <pair <double, double>> pa(n);
	for(auto &y : pa)
		cin >> y.first  >> y.second;

	map< double , set < double > >  ma;
	for(int x= 0;x <n; x++)
	{
		for(int y =x +1; y < n; y++)
		{
			double m, i ;
			if(pa[x].first == pa[y].first)
				ma[INF].insert(pa[x].first);
			else
			{
				m = pa[y].second - pa[x].second ;
				m/= pa[y].first - pa[x].first;
				if(pa[x].second == pa[y].second)
					ma[m].insert(INF);
				else

				ma[m].insert(pa[x].first  - pa[x].second / m );
			}
		}
	}

	int x1 = 0, x2 = 0;

	for(auto r : ma)
	{

	  int j = r.second.size();
	  x1 += j;
	  x2 += j * (j -1) / 2;
	}
	cout << (x1 * (x1 - 1) / 2) - x2 ;
}


#include<bits/stdc++.h>
using namespace std;
#define INF 100000000007.09021
int main()
{

	int n;
	cin >> n;
	vector <pair <long double,long double>> pa(n);
	for(auto &y : pa)
		cin >> y.first  >> y.second;

	map< long double , set < long double > >  ma;
	for(int x= 0;x <n; x++)
	{
		for(int y =x +1; y < n; y++)
		{
			long double m, i ;
			if(pa[x].first == pa[y].first)
				ma[INF].insert(pa[x].first);
			else
			{
				m = pa[y].second - pa[x].second ;
				m/= pa[y].first - pa[x].first;
				if(pa[x].second == pa[y].second)
					ma[m].insert(pa[x].second);
				else

				ma[m].insert(pa[x].first  - pa[x].second / m );
			}
		}
	}

	long long  x1 = 0, x2 = 0;

	for(auto r : ma)
	{

	  long long
	   j = r.second.size();
	  x1 += j;
	  x2 += j * (j -1) / 2;
	}
	cout << (x1 * (x1 - 1) / 2) - x2 ;
}


#include<bits/stdc++.h>
using namespace std;
#define INF 1000000007.090
int main()
{

	int n;
	cin >> n;
	vector <pair <double, double>> pa(n);
	for(auto &y : pa)
		cin >> y.first  >> y.second;

	map< double , set < double > >  ma;
	for(int x= 0;x <n; x++)
	{
		for(int y =x +1; y < n; y++)
		{
			double m, i ;
			if(pa[x].first == pa[y].first)
				ma[INF].insert(pa[x].first);
			else
			{
				m = pa[y].second - pa[x].second ;
				m/= pa[y].first - pa[x].first;
				if(pa[x].second == pa[y].second)
					ma[m].insert(pa[x].second);
				else

				ma[m].insert(pa[x].first  - pa[x].second / m );
			}
		}
	}

	int x1 = 0, x2 = 0;

	for(auto r : ma)
	{

	  int j = r.second.size();
	  x1 += j;
	  x2 += j * (j -1) / 2;
	}
	cout << (x1 * (x1 - 1) / 2) - x2 ;
}


#include<bits/stdc++.h>
using namespace std;
#define INF 100000000007
int main()
{

	int n;
	cin >> n;
	vector <pair <long double,long double>> pa(n);
	for(auto &y : pa)
		cin >> y.first  >> y.second;

	map< long double , set < long double > >  ma;
	for(int x= 0;x <n; x++)
	{
		for(int y =x +1; y < n; y++)
		{
			long double m, i ;
			if(pa[x].first == pa[y].first)
				ma[INF].insert(pa[x].first);
			else
			{
				m = pa[y].second - pa[x].second ;
				m/= pa[y].first - pa[x].first;
				if(pa[x].second == pa[y].second)
					ma[m].insert(pa[x].second);
				else

				ma[m].insert(pa[x].first  - pa[x].second / m );
			}
		}
	}

	long long  x1 = 0, x2 = 0;

	for(auto r : ma)
	{

	  long long
	   j = r.second.size();
	  x1 += j;
	  x2 += j * (j -1) / 2;
	}
	cout << (x1 * (x1 - 1) / 2) - x2 ;
}


// They can't break me, as long as I know who I am...

#include<bits/stdc++.h>

#define F first
#define S second
#define PB push_back
#define sz(s) int((s).size())
#define bit(n,k) (((n)>>(k))&1)

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

const int maxn = 1e5 + 10, Big = 2e4 + 10;
ll a[maxn];

int main(){
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie();

    int n,d;
    cin >> n >> d;
    for(int i = 0; i < n; i++)
	cin >> a[i];
    int q; cin >> q;
    int pt = 0;
    while(q--){
	ll x;
	cin >> x;
	while(pt < n && a[pt]+1 <= x)
	    pt++;
	int pt1 = pt-1, pt2 = pt;
	pair<ll, bool> lst = {-2, 0};
	int dans = Big;
	auto f1 = [&](){
		      if( abs(lst.F - (x-a[pt1]-1)) <= 1 && lst.S != 0)
			  dans = min(dans, int( x-a[pt1]-1 ));
		      lst = {x-a[pt1]-1, 0};
		      pt1--;
		  };
	auto f2 = [&](){
		      if( abs(lst.F - (a[pt2]-x)) <= 1 && lst.S != 1)
			  dans = min(dans, int( a[pt2]-x ));
		      lst = {a[pt2]-x, 1};
		      pt2++;
		  };
	while(pt1 >= 0 && pt2 < n && x-a[pt1]-1 < Big && a[pt2]-x < Big){
	    if(x-a[pt1]-1 < a[pt2]-x)
		f1();
	    else
		f2();
	}
	if(pt1 >= 0)
	    f1();
	else if(pt < n)
	    f2();

	double ans = 2 * atan( 1 / double(dans) );
	if(pt != 0)
	    ans = max(ans, atan( 1 / double(x-a[pt-1]-1) ) );
	if(pt != n)
	    ans = max(ans, atan( 1 / double(a[pt]-x) ) );
	cout << setprecision(10) << ans << fixed << "\n";
    }
}
// #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")