#include<bits/stdc++.h>
#define MOD 1000000007
#define ll long long
using namespace std;
int n,a[200010],b[200010];
int mp[4010][4010],c[8010][4010];
ll ans;
int main()
{
	c[0][0]=1;
	for(int i=1;i<=8000;i++)
	{
		c[i][0]=1;
		int l=min(i,4000);
		for(int j=1;j<=l;j++)
			c[i][j]=(c[i-1][j-1]+c[i-1][j])%MOD;
	}
	scanf("%d",&n);
	for(int i=1;i<=n;i++)
	{
		scanf("%d%d",&a[i],&b[i]);
		++mp[a[i]+2000][b[i]+2000];
	}
	for(int i=4000;i>=0;i--)
		for(int j=4000;j>=0;j--)
			mp[i][j]=(mp[i+1][j]*1ll+mp[i][j+1]+mp[i][j])%MOD;
	for(int i=1;i<=n;i++)
		ans=(ans+mp[-a[i]+2000][-b[i]+2000]-c[2*(a[i]+b[i])][2*a[i]]+MOD)%MOD;
	ans=ans*500000004%MOD;
	printf("%lld",ans);
}