/*input
10
-31 -35
8 -36
22 64
5 73
-14 8
18 -58
-41 -85
1 -88
-21 -85
-11 82


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

int fun(pair<int,int> p1,pair<int,int> p2)
{
	int dy = abs(p2.second - p1.second);
	int dx = abs(p2.first - p1.first);
	// cout<<(dy*1.0/dx*1.0)<<" "<<(dy<=dx && dy>=(-1*dx))<<"\n";
	return  (dy<=dx);

}

int main()
{
	int T = 1; // cin>>T;
	while(T--)
	{
		int n;cin>>n;
		vector<pair<int,int>> p(n);
		for(int i=0;i<n;i++) cin>>p[i].first>>p[i].second;
		
		int ans=0;
		for(int i=0;i<n;i++)
		{
			for(int j=i+1;j<n;j++)
			{
				ans+=fun(p[i],p[j]);
			}
		}

		cout<<ans<<"\n";

	}
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
//#define int long long
#define REP(i,m,n) for(int i=(m);i<(n);i++)
#define rep(i,n) REP(i,0,n)
#define pb push_back
#define all(a) a.begin(),a.end()
#define rall(c) (c).rbegin(),(c).rend()
#define mp make_pair
#define endl '\n'
#define vec vector<ll>
#define mat vector<vector<ll> >
#define fi first
#define se second
#define double long double
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> pll;
//typedef long double ld;
typedef complex<double> Complex;
const ll INF=1e9+7;
const ll inf=INF*INF;
const ll mod=998244353;
const ll MAX=140010;


//gcd
ll gcd(ll a,ll b){
    if(min(a,b)==0)return max(a,b);
    if(max(a,b)%min(a,b)==0)return min(a,b);
    return gcd(min(a,b),max(a,b)%min(a,b));
}

signed main(){
    ll n;cin>>n;
    vector<ll>a(n);
    rep(i,n)cin>>a[i];
    sort(all(a));
    map<ll,pll>ma;
    ll ans=0;
    rep(i,n){
        REP(j,1,sqrt(a[i]+1)){
            if(a[i]%j==0){
                if(j<=a[0]){
                    if(ma.find(j)!=ma.end()){
                        ll g=ma[j].fi;
                        ll k=ma[j].se;
                        ma[j]=mp(gcd(g,a[i]),k+1);
                    }else{
                        ma[j]=mp(a[i],1);
                    }
                }
                if(a[i]/j<=a[0]){
                    if(ma.find(a[i]/j)!=ma.end()){
                        ll g=ma[a[i]/j].fi;
                        ll k=ma[a[i]/j].se;
                        ma[a[i]/j]=mp(gcd(g,a[i]),k+1);
                    }else{
                        ma[a[i]/j]=mp(a[i],1);
                    }
                }
            }
        }
    }
    for(auto e:ma){
        if((e.fi==e.se.fi&&e.se.se>=2)||e.fi==a[0]){
            //cout<<e.fi<<endl;
            ans++;
        }
    }
    cout<<ans<<endl;
}