#include<cstdio>
long long n,x,y,mod,ans,p[4001][4001],f[8001],vis[4001][4001];
long long mi(long long k,long long p)
{
	if (!p)return 1;
	long long s=mi(k,p/2);
	s=s*s%mod;
	if (p%2)s=s*k%mod;
	return s;
}
long long c(long long n,long long m)
{
	return f[n]*mi(f[m],mod-2)%mod*mi(f[n-m],mod-2)%mod;
}
int main()
{
	mod=1000000007;
	f[1]=1;
	for (int i=2;i<=8000;i++)f[i]=f[i-1]*i%mod;
	scanf("%lld",&n);
	for (int i=1;i<=n;i++)
	{
		scanf("%lld%lld",&x,&y);
		p[2000-x][2000-y]++;
		ans=(ans+c(2*x+2*y,2*y))%mod;
		vis[x+2000][y+2000]++;
	}
	ans=mod-ans;
	for (int i=0;i<=4000;i++)
		for (int j=0;j<=4000;j++)
		{
			if (i)p[i][j]=(p[i][j]+p[i-1][j])%mod;
			if (j)p[i][j]=(p[i][j]+p[i][j-1])%mod;
			ans=(ans+vis[i][j]*p[i][j])%mod;
		}
	printf("%lld",ans*mi(2,mod-2)%mod);
}