#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
typedef long long ll;
int p=1000000007,add=2001;
int n,a[200005],b[200005],fac[8005],inv[8005],f[4005][4005],ans;
inline int ksm(int a,int b){
	int res=1;
	while(b){
		if(b&1)res=(ll)res*a%p;
		a=(ll)a*a%p;b>>=1;
	}
	return res;
}
int main(){
	scanf("%d",&n);
	for(int i=1;i<=n;++i){
		scanf("%d%d",a+i,b+i);
		++f[add-a[i]][add-b[i]];
	}
	fac[0]=1;
	for(int i=1;i<=8000;++i)fac[i]=(ll)fac[i-1]*i%p;
	inv[8000]=ksm(fac[8000],p-2);
	for(int i=7999;~i;--i)inv[i]=(ll)inv[i+1]*(i+1)%p;
	for(int i=1;i<=4001;++i)
		for(int j=1;j<=4001;++j)
			f[i][j]=((f[i][j]+f[i-1][j])%p+f[i][j-1])%p;
	for(int i=1;i<=n;++i){
		ans=(ans+f[add+a[i]][add+b[i]])%p;
		ans=(ans-(ll)fac[(a[i]+b[i])<<1]*inv[a[i]<<1]%p*inv[b[i]<<1]%p+p)%p;
	}
	ans=(ll)ans*500000004%p;
	printf("%d\n",ans);
	return 0;
}