#include<cstdio>
#include<cstring>
#include<algorithm>
#define MAXN 200000
#define MAXV 4000
#define MO 1000000007
using namespace std;
int n,A[MAXN+5],B[MAXN+5];
int dp[MAXV+5][MAXV+5];
int fact[MAXV*2+5],inv[MAXV*2+5];
int PowMod(int a,int b)
{
	int ret=1;
	while(b)
	{
		if(b&1)
			ret=1LL*ret*a%MO;
		a=1LL*a*a%MO;
		b>>=1;
	}
	return ret;
}
void prepare()
{
	fact[0]=1;
	for(int i=1;i<=MAXV*2;i++)
		fact[i]=1LL*fact[i-1]*i%MO;
	inv[MAXV*2]=PowMod(fact[MAXV*2],MO-2);
	for(int i=MAXV*2-1;i>=0;i--)
		inv[i]=1LL*inv[i+1]*(1LL*i+1LL)%MO;
}
int C(int a,int b)
{
	return 1LL*fact[a]*inv[b]%MO*inv[a-b]%MO;
}
int main()
{
//	freopen("bbq.in","r",stdin);
//	freopen("bbq.out","w",stdout);
	prepare();
	scanf("%d",&n);
	int maxval=-1;
	for(int i=1;i<=n;i++)
	{
		scanf("%d %d",&A[i],&B[i]);
		maxval=max(maxval,A[i]);
		maxval=max(maxval,B[i]);
	}
	maxval++;
	for(int i=1;i<=n;i++)
		dp[maxval-A[i]][maxval-B[i]]++;
	for(int i=-maxval+1;i<=maxval;i++)
		for(int j=-maxval+1;j<=maxval;j++)
			dp[i+maxval][j+maxval]=(1LL*dp[i+maxval][j+maxval]+1LL*dp[i-1+maxval][j+maxval]+1LL*dp[i+maxval][j-1+maxval])%MO;
	int ans=0;
	for(int i=1;i<=n;i++)
	{
		ans=(1LL*ans+1LL*dp[A[i]+maxval][B[i]+maxval])%MO;
		ans=((1LL*ans-1LL*C(A[i]+B[i]+A[i]+B[i],A[i]+A[i]))%MO+MO)%MO;
	}
	ans=1LL*ans*PowMod(2,MO-2)%MO;
	printf("%d\n",ans);
	return 0;
}