#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
const int N=2e5+5,M=2005,Mod=1e9+7;
int a[N],b[N];
int dp[M<<1][M<<1],fac[M<<2],inv[M<<2];
#define C(n,m) (1ll*fac[n]*inv[m]%Mod*inv[n-m]%Mod)
#define dp(i,j) dp[i+M][j+M]
inline int qpow(int a,int b){
	int ans=1;while (b){if (b&1) ans=1ll*ans*a%Mod;b>>=1,a=1ll*a*a%Mod;}
	return ans;
}
inline int mo(int x){return x>=Mod?x-Mod:x;}
int main (){
	int n;scanf ("%d",&n);
	for (int i=1;i<=n;i++)
		scanf ("%d%d",&a[i],&b[i]);
	fac[0]=1;for (int i=1;i<=8000;i++) fac[i]=1ll*fac[i-1]*i%Mod;
	inv[8000]=qpow(fac[8000],Mod-2);for (int i=7999;i>=0;i--) inv[i]=1ll*inv[i+1]*(i+1)%Mod;
	for (int i=1;i<=n;i++) dp(-a[i],-b[i])++;
	for (int i=-2000;i<=2000;i++)
		for (int j=-2000;j<=2000;j++)
			dp(i,j)=mo(dp(i,j)+mo(dp(i-1,j)+dp(i,j-1)));
	int ans=0;
	for (int i=1;i<=n;i++) ans=((ans+dp(a[i],b[i])-C(2*(a[i]+b[i]),2*a[i]))%Mod+Mod)%Mod;
	printf ("%d",1ll*ans*qpow(2,Mod-2)%Mod);
	return 0;
}
