#include<bits/stdc++.h>
#define N 200005
#define M 4005
#define p 1000000007
using namespace std;

inline bool rd(int &X)
{
    X=0;int w=0;char ch=0;
    while(!isdigit(ch))w|=ch=='-',ch=getchar();
    while( isdigit(ch))X=(X<<3)+(X<<1)+(ch^48),ch=getchar();
    X=w?-X:X; return 1;
}

int n,ans;
int fac[N],inv[N];
int a[N],b[N],f[M][M];

int POW(int a,int b,int ans=1){
    for(;b;b>>=1,a=1ll*a*a%p)
        if(b&1) ans=1ll*ans*a%p;
    return ans;
}
int C(int n,int m){
    return 1ll*fac[n]*inv[m]%p*inv[n-m]%p;
}
signed main()
{
    rd(n);
    for(int i=1;i<=n;i++)
        rd(a[i]),rd(b[i]),f[2001-a[i]][2001-b[i]]++;
    fac[0]=inv[0]=1;
    for(int i=1;i<=8000;i++)
        fac[i]=1ll*fac[i-1]*i%p,inv[i]=POW(fac[i],p-2);
    for(int i=1;i<=4001;i++)
        for(int j=1;j<=4001;j++)
            f[i][j]+=(f[i-1][j]+f[i][j-1])%p;
    for(int i=1;i<=n;i++)
        (ans+=f[2001+a[i]][2001+b[i]])%=p;
    for(int i=1;i<=n;i++)
        (ans-=C(a[i]+a[i]+b[i]+b[i],a[i]+a[i]))%=p;
    ans=(ans+p)%p;
    cout<<1ll*ans*POW(2,p-2)%p;
}
