#include<bits/stdc++.h>
#define ll long long
using namespace std;
const int N=2e5+10,K=2010,KK=2000,KK2=4000,KK4=8000;
const ll P=1e9+7;
int a[N],b[N];
ll dp[K<<1][K<<1];
ll fac[K<<2],inv[K<<2];
ll pwr(ll x,ll y){
	ll z=1;
	for(;y;y>>=1){
		if(y&1)z=z*x%P;
		x=x*x%P;
	}
	return z;
}
inline void getfac(int n){
	fac[0]=1;
	for(int i=1;i<=n;++i)
		fac[i]=fac[i-1]*i%P;
	inv[n]=pwr(fac[n],P-2);
	for(int i=n;i;--i)
		inv[i-1]=inv[i]*i%P;
}
inline ll C(int n,int m){
	return fac[n]*inv[m]%P*inv[n-m]%P;
}
int main(){
	int n;
	scanf("%d",&n);
	for(int i=1;i<=n;++i){
		scanf("%d%d",&a[i],&b[i]);
		(++dp[KK-a[i]][KK-b[i]])%=P;
	}
	for(int i=0;i<=KK2;++i)
		for(int j=0;j<=KK2;++j)
			(dp[i][j]+=dp[i-1][j]+dp[i][j-1])%=P;
	ll ans=0;
	for(int i=1;i<=n;++i)
		(ans+=dp[KK+a[i]][KK+b[i]])%=P;
	getfac(KK4);
	for(int i=1;i<=n;++i)
		ans=(ans-C((a[i]<<1)+(b[i]<<1),a[i]<<1)+P)%P;
	ans=ans*pwr(2,P-2)%P;
	printf("%lld\n",ans);
	return 0;
}