#include<bits/stdc++.h>
const int maxn = 200200;
const int mod = 1e9 + 7;
const int N = 2010;
typedef long long ll;
int n;
int A[N + N][N + N], B[N][N];
int fac[maxn], ifac[maxn], inv[maxn];
int main() {
	std::ios::sync_with_stdio(false), std::cin.tie(0);
	fac[0] = fac[1] = ifac[0] = ifac[1] = inv[1] = 1;
	for(int i = 2;i < N + N + N + N;++i) {
		inv[i] = ll(mod - mod / i) * inv[mod % i] % mod;
		fac[i] = (ll) fac[i - 1] * i % mod;
		ifac[i] = (ll) ifac[i - 1] * inv[i] % mod;
	}
	std::cin >> n;
	int ans = 0;
	for(int i = 0, a, b;i < n;++i) {
		std::cin >> a >> b;
		++ A[a + N][b + N];
		++ B[a][b];
		ans = (ans + (ll) (mod - fac[a + a + b + b]) * ifac[a + a] % mod * ifac[b + b]) % mod;
	}
	for(int i = 4010;i >= 0;--i) for(int j = 4010;j >= 0;--j)
		A[i][j] = ((unsigned) A[i + 1][j] + A[i][j + 1] + A[i][j]) % mod;
	for(int i = N;i >= 1;--i) for(int j = N;j >= 1;--j) 
		ans = (ans + (ll) A[i][j] * B[N - i][N - j]) % mod;
	std::cout << ans * ll(mod + 1 >> 1) % mod << '\n';
}
