#include<iostream>
using namespace std;
#define mod 1000000007
#define N 200127
#define U 8001
inline int M(int x){return (x>=mod)?(x-mod):x;}
inline int M1(int x){return (x<0)?(x+mod):x;}
inline int ksm(int p,int k)
{
	int res=1;
	while(k)
	{
		if(k&1)res=1ll*res*p%mod;
		p=1ll*p*p%mod;k>>=1;
	}return res;
}
int n,a[N],b[N],s[N],fac[U],inv[U],f[4001][4001];
//令f[i][j]表示点集偏移i,j的答案,组合数前缀和转移 
//如果在凸包上,为1,否则为左下角矩形和 
inline int C(int n,int m)
{return 1ll*fac[n]*inv[m]%mod*inv[n-m]%mod;}
int main(){
	scanf("%d",&n);int i,j,ans=0;
	for(i=1;i<=n;i++)scanf("%d%d",&a[i],&b[i]),s[i]=a[i]+b[i];
	fac[0]=1;for(i=1;i<U;i++)fac[i]=1ll*fac[i-1]*i%mod;
	inv[U-1]=ksm(fac[U-1],mod-2);
	for(i=U-2;i>=0;i--)inv[i]=1ll*inv[i+1]*(i+1)%mod;
	for(i=1;i<=n;i++)++f[2000-a[i]][2000-b[i]];
	for(i=0;i<=4000;i++)
	for(j=0;j<=4000;j++)
	f[i][j]=M(f[i][j]+M((i?f[i-1][j]:0)+(j?f[i][j-1]:0)));
	for(i=1;i<=n;i++)ans=M1(M(ans+f[2000+a[i]][2000+b[i]])-C(s[i]*2,a[i]*2));
	printf("%d",1ll*ans*ksm(2,mod-2)%mod);return 0;
}