#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 fac[maxn*16];
ll rfac[maxn*16];


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

    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;
}
