#include <cstdio>
using namespace std;
const long long mod=1000000007;
const int N=200005;
const int M=2005;
const int S=2005;
const int T=4010;
const int G=8010;
int n,i,j;
int a[N],b[N];
int h[T][T],ans;
int frac[G],inv[G];
long long getinv(long long b,int e=mod-2)
{
	if (e==0)
		return 1ll;
	long long ret=getinv(b,e>>1);
	ret=ret*ret%mod;
	if (e&1)
		ret=ret*b%mod;
	return ret;
}
int main()
{
	scanf("%d",&n);
	frac[0]=1;
	for (i=1;i<G;i++)
		frac[i]=1ll*i*frac[i-1]%mod;
	inv[G-1]=getinv(frac[G-1]);
	for (i=G-2;i>=0;i--)
		inv[i]=1ll*(i+1)*inv[i+1]%mod;
	for (i=1;i<=n;i++)
	{
		scanf("%d%d",&a[i],&b[i]);
		h[S-a[i]][S-b[i]]++;
	}
	for (i=1;i<T;i++)
		for (j=1;j<T;j++)
			h[i][j]=(1ll*h[i][j]+1ll*h[i-1][j]+1ll*h[i][j-1])%mod;
	for (i=1;i<=n;i++)
	{
		ans=(ans+h[S+a[i]][S+b[i]])%mod;
		ans=(1ll*ans+mod-1ll*frac[2*(a[i]+b[i])]*inv[2*a[i]]%mod*inv[2*b[i]]%mod)%mod;
	}
	printf("%lld\n",ans*getinv(2)%mod);
	return 0;
}