#include<bits/stdc++.h>

using namespace std;

const int mod=1000000007;
int n,m,ans,f[4005][4005],a[300000],b[300000];

int main(){
	scanf("%d",&n); m=4000;
	f[0][0]=1;
	for (int i=0;i<=m;++i)
		for (int j=0;j<=m;++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;
		}
	for (int i=1;i<=n;++i){
		scanf("%d%d",a+i,b+i);
		ans=(ans-f[a[i]*2][b[i]*2]+mod)%mod;
	}
	memset(f,0,sizeof f);
	for (int i=1;i<=n;++i) ++f[2000-a[i]][2000-b[i]];
	for (int i=0;i<=m;++i)
		for (int j=0;j<=m;++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;
		}
	for (int i=1;i<=n;++i) ans=(ans+f[2000+a[i]][2000+b[i]])%mod;
	printf("%lld\n",(long long)ans*(mod+1)/2%mod);
	
	return 0;
}
			