#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef pair <ll , int> pll;
typedef vector <ll> vll;
typedef pair <pll,ll> p3l;
#define pb push_back
#define X first
#define Y second
#define mkp make_pair
#define smax(a,b) a=max(a,b)
#define ER(x) cout<<#x<<" "<<x<<"\n";
#define smin(a,b) a=min(a,b)
#define SZ(s) (ll)((s).size())
#define For(i,a,b) for (int i=a;i<b;i++)
#define Ford(i,a,b) for (int i=a;i>=b;i--)
#define RET(x) {cout<<x<<'\n';} //return 0;}
#define RETD(x) {cout << fixed << setprecision(15) << x <<'\n';}
#define IOS ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0)
const ll maxn=2e5+10,M=4e3+10,SQ=360,bghs=1e9+7,inf=1e18+15,LG=22,I=2e3+5;
ll n,dp[M][M],fac[4*M];
pll ab[maxn];
ll pw(ll x,ll n=bghs-2)
{
    if (n==0) return 1;
    ll res=pw(x,n/2);
    res*=res; res%=bghs;
    if (n%2) res*=x,res%=bghs;
    return res;
}
ll C(ll i,ll j)
{
    return (((fac[i]*pw(fac[j]))%bghs)*pw(fac[i-j]))%bghs;
}
int main()
{
    IOS; cin>>n;
    For(i,0,n) {cin>>ab[i].X>>ab[i].Y;dp[I-ab[i].X][I-ab[i].Y]++;}
    For(i,1,M) For(j,1,M) dp[i][j]+=(dp[i-1][j]+dp[i][j-1]),dp[i][j]%=bghs;
    ll ans=0;
    fac[0]=1;
    For(i,1,4*M) fac[i]=(i*fac[i-1])%bghs;
    For(i,0,n)
    {
        ans=(ans+dp[I+ab[i].X][I+ab[i].Y])%bghs;
        //ER(dp[I-ab[i].X][I-ab[i].Y]);
        ans=(ans-C(2*(ab[i].X+ab[i].Y),2*ab[i].X))%bghs;
    }
    cout<<(((ans+bghs)%bghs)*(ll)(5e8 + 4))%bghs<<'\n';
}
