#include<cstdio>
#include<cstring>
#include<algorithm>
typedef long long ll;
#define base 2002
#define inv2 500000004ll
#define Mod 1000000007ll
#define N 200050
int n,a[N],b[N];
ll f[base*2][base*2];
ll fac[base*4],inv[base*4],ans;
inline ll qpow(ll b,ll p){
	ll res=1ll;
	while(p){
		if(p&1ll) (res*=b)%=Mod;
		(b*=b)%=Mod;
		p>>=1ll;
	}return res;
}
inline ll C(ll x,ll y){
	return fac[x]*inv[y]%Mod*inv[x-y]%Mod;
}
int main(){
	fac[0]=1;
	for(int i=1;i<=8000;++i)
		fac[i]=fac[i-1]*i%Mod;
	inv[8000]=qpow(fac[8000],Mod-2);
	for(int i=8000;i>=1;--i)
		inv[i-1]=inv[i]*i%Mod;
	scanf("%d",&n);
	for(int i=1;i<=n;++i){
		scanf("%d%d",&a[i],&b[i]);
		f[-a[i]+base][-b[i]+base]++;
	}
	for(int i=1;i<=4002;++i)
		for(int j=1;j<=4002;++j)
			f[i][j]=(f[i][j]+(f[i-1][j]+f[i][j-1])%Mod)%Mod;
	for(int i=1;i<=n;++i){
		ans=(ans+f[a[i]+base][b[i]+base])%Mod;
		ans=(ans-C(2ll*a[i]+2ll*b[i],2ll*a[i]))%Mod;
	}
	ans=(ans+Mod)%Mod;
	ans=(ans*inv2)%Mod;
	printf("%lld\n",ans);
	return 0;
}
