#include<cstdio>
const int P=200002,N=2003,M=1000000007;
typedef long long ll;
int n,i,j,a[P],b[P],f[N*2][N*2],fac[N*4],Ans;
void init(){
	scanf("%d",&n);
	for(i=1;i<=n;i++){
		scanf("%d%d",a+i,b+i);
		f[N-a[i]][N-b[i]]++;
	}
	fac[0]=1;
	for(i=1;i<N*4;i++)
		fac[i]=1ll*i*fac[i-1]%M;
}
ll ksm(ll x,int p){
	ll s=1;
	while(p){
		if(p&1)
			s=s*x%M;
		p>>=1;
		x=x*x%M;
	}
	return s;
}
ll inv(int x){
	return ksm(x,M-2);
}
void work(){
	for(i=1;i<N*2;i++)
		for(j=1;j<N*2;j++)
			f[i][j]=(f[i][j]+f[i-1][j]+f[i][j-1])%M;
	for(i=1;i<=n;i++){
		Ans=(Ans+f[N+a[i]][N+b[i]])%M;
		Ans=(Ans+M-fac[a[i]*2+b[i]*2]*inv(fac[a[i]*2])%M*inv(fac[b[i]*2])%M)%M;
	}
	printf("%d",Ans*inv(2)%M);
}
int main(){
	init();
	work();
	return 0;
}