#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <ctime>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <numeric>
#include <utility>
#include <iomanip>
#include <algorithm>
#include <functional>
using namespace std;

#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl
#define EACH(i, s) for (__typeof__((s).begin()) i = (s).begin(); i != (s).end(); ++i)

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<class T1, class T2> ostream& operator << (ostream &s, pair<T1,T2> P)
{ return s << '<' << P.first << ", " << P.second << '>'; }
template<class T> ostream& operator << (ostream &s, vector<T> P)
{ for (int i = 0; i < P.size(); ++i) { if (i > 0) { s << " "; } s << P[i]; } return s; }
template<class T> ostream& operator << (ostream &s, vector<vector<T> > P)
{ for (int i = 0; i < P.size(); ++i) { s << endl << P[i]; } return s << endl; }
template<class T1, class T2> ostream& operator << (ostream &s, map<T1,T2> P)
{ EACH(it, P) { s << "<" << it->first << "->" << it->second << "> "; } return s << endl; }



const int MAX = 500000;
const int MOD = 1000000007;
int N;
int A[MAX], B[MAX];

inline long long mod(long long a, long long m) { return (a % m + m) % m; }

struct Fp {
    long long val;
    
    Fp() : val(0) {}
    Fp(long long val_) { this->val = mod(val_, MOD); }
    Fp operator = (long long val_) { this->val = mod(val_, MOD); return *this; }
    inline Fp operator - () { return mod(-val, MOD); }
    inline const Fp& operator += (const Fp &x);
    inline const Fp& operator -= (const Fp &x);
    inline const Fp& operator *= (const Fp &x);
    inline const Fp& operator /= (const Fp &x);
};

ostream &operator << (ostream &os, Fp x) { return os << x.val;}
istream &operator >> (istream &is, Fp &x) { is >> x; return is; }
bool operator == (Fp x, Fp y) { return mod(x.val, MOD) == mod(y.val, MOD); }

inline Fp operator + (Fp x, Fp y) { return mod(x.val + y.val, MOD); }
inline Fp operator - (Fp x, Fp y) { return mod(x.val - y.val, MOD); }
inline Fp operator * (Fp x, Fp y) { return mod(x.val * y.val, MOD); }
inline Fp operator / (Fp x, Fp y) {
    long long a = y.val, b = MOD, u = 1, v = 0;
    while (b) {
        long long t = a/b;
        a -= t*b; swap(a, b);
        u -= t*v; swap(u, v);
    }
    return x * u;
}
inline Fp power(Fp a, long long n) {
    if (n == 0) return Fp(1);
    Fp t = power(a, n/2);
    t = t * t; if (n & 1) t = t * a;
    return t;
}
inline const Fp& Fp::operator += (const Fp &x) {*this = *this + x; return *this;}
inline const Fp& Fp::operator -= (const Fp &x) {*this = *this - x; return *this;}
inline const Fp& Fp::operator *= (const Fp &x) {*this = *this * x; return *this;}
inline const Fp& Fp::operator /= (const Fp &x) {*this = *this / x; return *this;}

int Com[4010][4010];

void calc_com() {
    memset(Com, 0, sizeof(Com));
    Com[0][0] = 1;
    for (int i = 1; i < 4010; ++i) {
        Com[i][0] = 1;
        Com[0][i] = 1;
    }
    for (int i = 1; i < 4010; ++i) {
        for (int j = 1; j < 4010; ++j) {
            Com[i][j] = (Com[i][j-1] + Com[i-1][j]);
            Com[i][j] %= MOD;
        }
    }
}

Fp dp[4010][4010];
long long solve() {
    Fp res = 0;
    memset(dp, 0, sizeof(dp));
    for (int i = 0; i < N; ++i) {
        dp[2005-A[i]][2005-B[i]] += 1;
    }
    for (int i = 1; i < 4010; ++i) {
        for (int j = 1; j < 4010; ++j) {
            dp[i][j] += dp[i-1][j] + dp[i][j-1];
        }
    }
    for (int i = 0; i < N; ++i) {
        res += dp[2005+A[i]][2005+B[i]];
    }
    
    for (int i = 0; i < N; ++i) {
        res -= Com[A[i]*2][B[i]*2];
        //cout << i << ": " <<Com[ A[i]*2 + B[i]*2 ][ A[i] * 2 ] << endl;
    }
    res /= 2;
    
    return res.val;
}

int main() {
    calc_com();
    while (cin >> N) {
        for (int i = 0; i < N; ++i) cin >> A[i] >> B[i];
        cout << solve() << endl;
    }
}




Measured memory_bytes: 190208