#include<iostream>
#include<cstdio>
#include<cstdlib>
#define N 200005
#define LL long long
#define re register
#define inv_2 500000004
using namespace std;
const int Mod=1e9+7,base=2002,Maxn=8000;
int n,a[N],b[N];
LL f[4010][4010],fac[Maxn+10],inv_fac[Maxn+10],ans=0;
LL power(LL x,int P){
	LL ans=1;
    for(;P;P>>=1,x=1ll*x*x%Mod) if(P&1) ans=1ll*ans*x%Mod;
    return ans;
}
void get_fac(){
	fac[0]=1; for(re int i=1;i<=Maxn;++i) fac[i]=1ll*fac[i-1]*i%Mod;
	inv_fac[Maxn]=power(fac[Maxn],Mod-2);for(re int i=Maxn-1;~i;--i) inv_fac[i]=1ll*inv_fac[i+1]*(i+1)%Mod;
}
inline LL C(int x,int y){ return fac[y]*inv_fac[x]%Mod*inv_fac[y-x]%Mod; }
int main(){
	scanf("%d",&n);get_fac();
	for(re int i=1;i<=n;++i) scanf("%d%d",&a[i],&b[i]),++f[base-a[i]][base-b[i]];
	for(re int i=1;i<=4002;++i)
	for(re int j=1;j<=4002;++j)
	f[i][j]=(f[i][j]+(f[i-1][j]+f[i][j-1])%Mod)%Mod;
	for(re int i=1;i<=n;++i) (ans+=f[base+a[i]][base+b[i]])%=Mod,(ans-=C(2*a[i],2*a[i]+2*b[i]))%=Mod;
	(ans+=Mod)%=Mod;(ans*=inv_2)%=Mod;
	printf("%lld\n",ans);
	return 0;
}