#include <bits/stdc++.h>
#define LL long long
using namespace std;
const int P = 1e9 + 7,N = 200005;
inline void upd(int &x,int v){ x = (x+v>=P)?(x+v-P):(x+v); }
int dp[4005][4005],n,x[N],y[N];
int fac[N],nfac[N],inv[N];
inline int C(int n,int m){ return (LL)fac[n] * nfac[m] % P * nfac[n-m] % P; }
int main(){
	int i,j;
	fac[0] = nfac[0] = inv[0] = fac[1] = nfac[1] = inv[1] = 1;
	for (i = 2; i <= 100000; ++i)
		fac[i] = (LL)fac[i-1] * i % P,inv[i] = (LL)(P-P/i) * inv[P%i] % P,nfac[i] = (LL)nfac[i-1] * inv[i] % P;
	cin >> n;
	for (i = 1; i <= n; ++i) cin >> x[i] >> y[i],++dp[2001-x[i]][2001-y[i]];
	for (i = 1; i <= 4001; ++i)
	for (j = 1; j <= 4001; ++j) upd(dp[i][j],dp[i-1][j]),upd(dp[i][j],dp[i][j-1]);
	int ans = 0;
	for (i = 1; i <= n; ++i) upd(ans,dp[2001+x[i]][2001+y[i]]),ans = (ans + P - C((x[i]+y[i])<<1,x[i]<<1)) % P;
	ans = (LL)ans * (P+1>>1) % P;
	cout << ans << '\n';
	return 0;
}