#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using vec = vector<ll>;
using mat = vector<vec>;
using pll = pair<ll,ll>;

#define INF (1LL << 60)
#define MOD 1000000007
#define PI 3.14159265358979323846

#define REP(i,m,n) for(ll (i)=(m),(i_len)=(n);(i)<(i_len);++(i))
#define FORR(i,v) for(auto (i):v)
#define ALL(x) (x).begin(), (x).end()
#define PR(x) cout << (x) << endl
#define PS(x) cout << (x) << " "
#define SZ(x) ((ll)(x).size())
#define MAX(a,b) (((a)>(b))?(a):(b))
#define MIN(a,b) (((a)<(b))?(a):(b))
#define REV(x) reverse(ALL((x)))
#define ASC(x) sort(ALL((x)))
#define DESC(x) ASC((x)); REV((x))
#define pb push_back
#define eb emplace_back

int main()
{
    ll N;
    cin >> N;
    vec x(N), y(N);
    REP(i,0,N) cin >> x[i] >> y[i];

    ll cnt = 0;
    REP(i,0,N-1) {
        REP(j,i+1,N) cnt += (abs(y[i]-y[j]) <= abs(x[i]-x[j]));
    }
    PR(cnt);

    return 0;
}

/*



*/
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>
#include<map>
#include<cmath>
#include<queue>
#include<stack>
#include<deque>
#include<list>
#include<bitset>
#include<sstream>

using namespace std;
using ll = long long;
const ll MOD = 1e9+7;
const ll INF = 1e18;
#define REP(i, n) for(int i = 0; i < n; i++)
#define endl "\n"
using Graph = vector<vector<int>>;

int main(){
    ll a,b,c;
    cin>>a>>b>>c;
    
    if(c%2==0){
        if(abs(a)<abs(b))cout<<"<"<<endl;
        else if(abs(a)>abs(b))cout<<">"<<endl;
        else if(abs(a)==abs(b))cout<<"="<<endl;
    }
    else{
        if(a<b)cout<<"<"<<endl;
        else if(a>b)cout<<">"<<endl;
        else if(a==b)cout<<"="<<endl;
    }
}