#include<bits/stdc++.h>
#define ll long long
using namespace std;
const ll p=1e9+7;
struct aaa{
	ll x,y;
}a[200010];
ll n,ans,jc[100010],ny[100010],f[4010][4010];
ll ksm(ll x,ll y){
	ll xlh=1;
	while(y){
		if(y&1)xlh=xlh*x%p;
		x=x*x%p;
		y/=2;
	}
	return xlh;
}
ll C(ll x,ll y){
	return jc[x]*ny[y]%p*ny[x-y]%p;
}
int main(){
	ll i,j;
	jc[0]=ny[0]=1;
	for(i=1;i<=10000;i++)jc[i]=jc[i-1]*i%p,ny[i]=ksm(jc[i],p-2);
	scanf("%lld",&n);
	for(i=1;i<=n;i++){
		scanf("%lld%lld",&a[i].x,&a[i].y);
		f[-a[i].x+2000][-a[i].y+2000]++;
	}
	for(i=0;i<=4000;i++)
	 for(j=0;j<=4000;j++){
	 	if(i)f[i][j]=(f[i][j]+f[i-1][j])%p;
	 	if(j)f[i][j]=(f[i][j]+f[i][j-1])%p;
	 }
	for(i=1;i<=n;i++){
		ans=(ans+f[a[i].x+2000][a[i].y+2000])%p;
		ans=(ans-C(a[i].x*2+a[i].y*2,a[i].x*2)+p)%p;
	}
	printf("%lld",ans*ksm(2,p-2)%p);
}
/*
转化成从原点走到ai+aj,bi+bj的方案
再转化成从-ai,-bi走到aj,bj的方案 
*/