#include <cstdio>
typedef long long LL;
const int N=4005,M=200005,mo=1000000007;
int a[M],b[M],f[N][N];
LL fac[N*2],inv[N*2];
LL ksm(LL x,LL y){
	LL i=1;
	for (;y;y>>=1,x=x*x%mo)
		if (y&1) i=i*x%mo;
	return i;
}
void Pre(int n){
	fac[0]=1;
	for (int i=1;i<=n;i++) fac[i]=fac[i-1]*i%mo;
	inv[n]=ksm(fac[n],mo-2);
	for (int i=n;i>=1;i--) inv[i-1]=inv[i]*i%mo;
}
LL C(int n,int m){
	return fac[n]*inv[m]%mo*inv[n-m]%mo;
}
int main(){
	int n,X=0,Y=0;
	scanf("%d\n",&n);
	for (int i=1;i<=n;i++){
		scanf("%d%d",&a[i],&b[i]);
		if (a[i]>X) X=a[i];
		if (b[i]>Y) Y=b[i];
	}
	for (int i=1;i<=n;i++) f[-a[i]+X][-b[i]+Y]++;
	for (int i=1;i<=X*2;i++) f[i][0]+=f[i-1][0];
	for (int i=1;i<=Y*2;i++) f[0][i]+=f[0][i-1];
	for (int i=1;i<=X*2;i++)
		for (int j=1;j<=Y*2;j++)
			(f[i][j]+=f[i-1][j]+f[i][j-1])%=mo;
	Pre((X+Y)*2);
	int ans=0;
	for (int i=1;i<=n;i++)
		ans=(ans+f[a[i]+X][b[i]+Y]-C((a[i]+b[i])*2,a[i]*2))%mo;
	ans=ans*inv[2]%mo;
	printf("%d\n",(ans+mo)%mo);
}