#include<bits/stdc++.h>
#define int long long int
#define PB push_back
using namespace std;
const int INF = 3643648101919114514;
const int MOD = (int)1e9 + 7;

int n, a[200010], b[200010];
int dp1[4010][4010], dp2[4010][4010];
int ans = 0;

signed main()
{
  cin >> n;
  for(int i = 1; i <= n; i++){
    cin >> a[i] >> b[i];
    dp1[2005 - a[i]][2005 - b[i]]++;
  }

  for(int i = 1; i <= 4008; i++){
    for(int j = 1; j <= 4008; j++){
      dp1[i][j] += dp1[i - 1][j] + dp1[i][j - 1];
      dp1[i][j] %= MOD;
    }
  }

  dp2[0][0] = 1;
  for(int i = 0; i <= 4008; i++){
    for(int j = 0; j <= 4008; j++){
      if(i > 0)
	dp2[i][j] += dp2[i - 1][j];
      if(j > 0)
	dp2[i][j] += dp2[i][j - 1];
      dp2[i][j] %= MOD;
    }
  }

  for(int i = 1; i <= n; i++){
    ans += dp1[2005 + a[i]][2005 + b[i]];
    ans %= MOD;
  }
  for(int i = 1; i <= n; i++){
    ans -= dp2[a[i] * 2][b[i] * 2];
    ans += MOD;
    ans %= MOD;
  }

  cout << ans * 500000004 % MOD<< endl;
  return 0;
}
