#include<bits/stdc++.h>
using namespace std;
const int N=200010,M=8000,MOD=1000000007,inv=500000004;
int fac[M+10],ifac[M+10],f[M/2+10][M/2+10],base=M/4+2,A[N],B[N];
inline int Power(int a,int b)
{
    register int ans=1;
    for(;b;b>>=1,a=1ll*a*a%MOD)
        if(b&1)
			ans=1ll*ans*a%MOD;
    return ans;
}
inline int C(int n,int m)
{
	return 1ll*fac[n]*ifac[m]%MOD*ifac[n-m]%MOD;
}
int main()
{
    fac[0]=1;
    for(register int i=1;i<=M;++i)
        fac[i]=1ll*fac[i-1]*i%MOD;
    ifac[M]=Power(fac[M],MOD-2);
    for(register int i=M-1;i>=0;--i)
        ifac[i]=1ll*ifac[i+1]*(i+1)%MOD;
	register int n;
	scanf("%d",&n);
    for(register int i=1;i<=n;++i)
        scanf("%d%d",&A[i],&B[i]),++f[base-A[i]][base-B[i]];
    for(register int i=1;i<=M/2+2;++i)
        for(register int j=1;j<=M/2+2;++j)
            f[i][j]=(f[i][j]+(f[i-1][j]+f[i][j-1])%MOD)%MOD;
    register int ans=0;
    for(register int i=1;i<=n;++i)
        ans=(ans+f[A[i]+base][B[i]+base])%MOD,ans=(ans-C(2*A[i]+2*B[i],2*A[i])+MOD)%MOD;
    ans=1ll*inv*ans%MOD;
    return cout<<ans<<endl,0;
}