#include <bits/stdc++.h>

const int N=200005; 
const int base=2000; 
const long long mod=1000000007; 

using namespace std;

int n;
int a[N],b[N]; 
 
long long ans; 
long long f[4005][4005]; 
long long fac[8005],inv[8005];

long long C(int a,int b){ return fac[a]*inv[b]%mod*inv[a-b]%mod; }

int main(){
	cin>>n; 
	for(int i=1; i<=n; ++i) cin>>a[i]>>b[i];
	for(int i=1; i<=n; ++i) ++f[base-a[i]][base-b[i]]; 
	for(int i=0; i<=base<<1; ++i)
		for(int j=0; j<=base<<1; ++j){
			if(i>0) f[i][j]=(f[i][j]+f[i-1][j])%mod; 
			if(j>0) f[i][j]=(f[i][j]+f[i][j-1])%mod; 
		}
	fac[0]=1; 
	for(int i=1; i<=8000; ++i) fac[i]=1ll*i*fac[i-1]%mod;  
	inv[0]=inv[1]=1; 
	for(int i=2; i<=8000; ++i) inv[i]=(mod-mod/i)*inv[mod%i]%mod; 
	for(int i=2; i<=8000; ++i) inv[i]=inv[i]*inv[i-1]%mod; 
	for(int i=1; i<=n; ++i) ans=(ans+f[base+a[i]][base+b[i]])%mod; 
	for(int i=1; i<=n; ++i) {
		ans=(ans-C((a[i]+b[i])<<1,a[i]<<1))%mod;  
		if(ans<0) ans+=mod;
	}
	ans=(ans*inv[2])%mod; 
	cout<<ans<<endl; 
	return 0; 
}