#include<bits/stdc++.h>
using namespace std;
#define N 200010
#define M 8010
typedef long long ll;
ll jc[M],ijc[M],f[M/2][M/2],a[N],b[N],n,va=2002;
#define mo 1000000007ll
ll qp(ll x,ll y){
	ll r=1;
	for(;y;y>>=1,x=x*x%mo)
		if(y&1)r=r*x%mo;
	return r;
}
ll c(int y,int x){return jc[y]*ijc[x]%mo*ijc[y-x]%mo;}
int main(){
	jc[0]=ijc[0]=1;
	cin>>n;
	for(ll i=1;i<M;i++)jc[i]=jc[i-1]*i%mo;
	ijc[M-1]=qp(jc[M-1],mo-2);
	for(ll i=M-2;~i;i--)ijc[i]=ijc[i+1]*(i+1ll)%mo;
	for(int i=1;i<=n;i++){
		cin>>a[i]>>b[i];
		f[va-a[i]][va-b[i]]++;
	}
	for(int i=1;i<=va*2;i++)
		for(int j=1;j<=va*2;j++)
			f[i][j]=(f[i][j]+f[i-1][j]+f[i][j-1])%mo;
	ll r=0;
	for(int i=1;i<=n;i++){
		r=(r+f[a[i]+va][b[i]+va])%mo;
		r=(r-c(2*a[i]+2*b[i],2*a[i])+mo)%mo;
	}
	r=r*qp(2,mo-2)%mo;
	cout<<r;
}