#include<cstdio>
#include<algorithm>
#define _rep(i,s,t) for(register int i=s;i>=t;--i)
#define rep(i,s,t) for(register int i=s;i<=t;++i)
using namespace std;
const int N=8011,M=2e5+11,mod=1e9+7,half=N/2;
int n;
int f[N][N],ans,fac[N],ifac[N],a[M],b[M];
inline void inc(int &x,int y){
	x+=y;
	if(x>=mod)
		x-=mod;
}
inline int fp(int a,int b){
	int res=1;
	for(;b;b>>=1,a=1ll*a*a%mod)
		if(b&1)
			res=1ll*res*a%mod;
	return res;
}
inline int C(int n,int m){
	return 1ll*fac[n]*ifac[n-m]%mod*ifac[m]%mod;
}
int main(){
	scanf("%d",&n);
	rep(i,1,n){
		scanf("%d%d",a+i,b+i);
		++f[half-a[i]][half-b[i]];
	}
	rep(i,0,N-1)
		rep(j,0,N-1)
			inc(f[i][j],(i?f[i-1][j]:0)+(j?f[i][j-1]:0));
	fac[0]=1;
	rep(i,1,N-1)
		fac[i]=1ll*i*fac[i-1]%mod;
	ifac[N-1]=fp(fac[N-1],mod-2);
	_rep(i,N-1,1)
		ifac[i-1]=1ll*i*ifac[i]%mod;
	rep(i,1,n){
		inc(ans,f[half+a[i]][half+b[i]]);
		ans=(ans-C(a[i]+a[i]+b[i]+b[i],a[i]+a[i])+mod)%mod;
	}
	ans=1ll*ans*(mod+1)/2%mod;
	printf("%d\n",ans);
	return 0;
}