//2018.9.20 by ljz
#include<bits/stdc++.h>
using namespace std;
#define res register LL
#define LL long long
#define inf 0x3f3f3f3f
#define eps 1e-15
inline LL read(){
    res s=0;
    bool w=0;
    char ch=getchar();
    while(ch<'0'||ch>'9'){if(ch=='-')w=1;ch=getchar();}
    while(ch>='0'&&ch<='9')s=s*10+ch-'0',ch=getchar();
    return w?-s:s;
}
inline void _swap(res &x,res &y){
    x^=y^=x^=y;
}
inline LL _abs(const res &x){
    return x>0?x:-x;
}
inline LL _max(const res &x,const res &y){
    return x>y?x:y;
}
const LL kcz=1e9+7;
const LL N=2e6+10,P=2e3+10;
namespace MAIN{
    LL inv[N],fac[N];
    inline void pre(){
        inv[0]=inv[1]=fac[0]=fac[1]=1;
        for(res i=2;i<=N-10;i++)fac[i]=(LL)fac[i-1]*i%kcz,inv[i]=(LL)inv[kcz%i]*(kcz-kcz/i)%kcz;
        for(res i=2;i<=N-10;i++)inv[i]=(LL)inv[i]*inv[i-1]%kcz;
    }
    inline LL C(const res &x,const res &y){
        return (LL)fac[x]*inv[y]%kcz*inv[x-y]%kcz;
    }
    LL n;
    LL dp[P*2+1000][P*2+1000];
    LL a[N],b[N],ans;
    inline void add(res &x,const res &y){
        x+=y;
        x=(x%kcz+kcz)%kcz;
    }
    inline LL qpow(res x,res y){
        res ans=1;
        while(y){
            if(y&1)ans=(LL)ans*x%kcz;
            y>>=1,x=(LL)x*x%kcz;
        }
        return ans%kcz;
    }
    inline void MAIN(){
        pre();
        n=read();
        for(res i=1;i<=n;i++)a[i]=read(),b[i]=read(),dp[P-a[i]][P-b[i]]++;
        for(res i=1;i<=2*P;i++)
            for(res j=1;j<=2*P;j++)
                add(dp[i][j],dp[i-1][j]+dp[i][j-1]);
        for(res i=1;i<=n;i++)add(ans,dp[P+a[i]][P+b[i]]),add(ans,kcz-C((a[i]+b[i])*2,a[i]*2));
        printf("%lld\n",ans*qpow(2,kcz-2)%kcz);
    }
}
int main(){
    MAIN::MAIN();
    return 0;
}