#include <bits/stdc++.h>
using namespace std;

const int MOD = 1000000007;

int ncr[8005][8005];
int dp[4005][4005];
int a[200005];
int b[200005];
int ans, n;

int main()
{
	ncr[0][0] = 1;
	for (int i = 1;i < 8002;i++)
	{
		ncr[i][0] = ncr[i][i] = 1;
		for (int j = 1;j < i;j++) ncr[i][j] = (ncr[i-1][j-1]+ncr[i-1][j])%MOD;
	}
	scanf("%d", &n);
	for (int i = 0;i < n;i++)
	{
		scanf("%d%d", a+i, b+i);
		dp[2001-a[i]][2001-b[i]]++;
	}
	for (int i = 1;i < 4002;i++) for (int j = 1;j < 4002;j++) dp[i][j] = (dp[i][j]+dp[i-1][j]+dp[i][j-1])%MOD;
	for (int i = 0;i < n;i++) ans = (ans+dp[2001+a[i]][2001+b[i]])%MOD;
	for (int i = 0;i < n;i++) ans = ((ans-ncr[a[i]+a[i]+b[i]+b[i]][a[i]+a[i]])%MOD+MOD)%MOD;
	ans = (500000004ll*ans)%MOD;
	printf("%d\n", ans);
	return 0;
}
