#include<bits/stdc++.h>

using namespace std;

typedef long long LL;

const int MX=4005,N=MX/2,MXV=200005,md=1000000007,iv2=(md+1)/2;
int n,m,ch,ff,ans;
int a[MXV],b[MXV];
int s[MX][MX],C[MX][MX];

int main(){
	int i,j;
	cin>>n;
	for(i=1;i<=n;i++)cin>>a[i]>>b[i];
	for(i=1;i<=n;i++)s[N-a[i]][N-b[i]]++;
	for(i=1;i<MX;i++)C[i][0]=C[0][i]=1;
	for(i=1;i<MX;i++)
		for (j=1;j<MX;j++) {
			s[i][j]=(s[i-1][j]+s[i][j-1]+s[i][j])%md;
			C[i][j]=(C[i-1][j]+C[i][j-1])%md;
		}
	for(i=1;i<=n;i++)ans=(ans+s[N+a[i]][N+b[i]])%md;
	for(i=1;i<=n;i++)ans=(ans+md-C[a[i]*2][b[i]*2])%md;
	ans=(LL)ans*iv2%md;
	cout<<ans<<endl;
	return 0;
}