#include<bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define ld long double
#define F first
#define S second
#define pii pair<ll,ll>

using namespace :: std;

const ll maxn=2050;
const ll mod=1e9+7;
const ll inf=1e9+500;

ll  s[maxn*2][maxn*2];
ll  t[maxn*2][maxn*2];
ll dp[maxn*2][maxn*2];
ll ent[maxn*2][maxn*2];

ll poww(ll a,ll b){
    ll ans=1;
    while(b){
        if(b&1){
            ans=(ans*a)%mod;
        }
        a=(a*a)%mod;
        b>>=1;
    }
    return ans;
}
int main(){
    ll n;
    cin>>n;
    ent[0][0]=1;
    for(ll i=1;i<2*maxn;i++){
        ent[i][0]=1;
        ent[i][i]=1;
        for(ll j=1;j<i;j++){
            ent[i][j]=(ent[i-1][j]+ent[i-1][j-1])%mod;
        }
    }
    ll ans=0;
    for(ll i=0;i<n;i++){
        ll a,b;
        cin>>a>>b;
        s[-a+maxn][-b+maxn]++;
        t[+a+maxn][+b+maxn]++;

        ans-=ent[2*(a+b)][2*a];
    }
    ans%=mod;
    ans+=mod;
    ans%=mod;
    for(ll i=1;i<maxn*2;i++){
        for(ll j=1;j<maxn*2;j++){
            dp[i][j]=(dp[i-1][j]+dp[i][j-1]+s[i][j])%mod;
            ans+=(t[i][j]*dp[i][j])%mod;
        }
    }
    ans%=mod;
    cout<<(ans*poww(2,mod-2))%mod;
}
