#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
const int mod = 1000000007;
int n, a[N], b[N];
int f[4005][4005];
long long fact[8005], invfact[8005], inv[8005];
long long C(int n, int m) {
	return fact[n] * invfact[m] % mod * invfact[n - m] % mod;
}
int main() {
	inv[1] = 1;
	for (int i = 2; i <= 8000; i++)
		inv[i] = (mod - mod / i) * inv[mod % i] % mod;
	fact[0] = invfact[0] = 1;
	for (int i = 1; i <= 8000; i++) {
		fact[i] = fact[i - 1] * i % mod;
		invfact[i] = invfact[i - 1] * inv[i] % mod;
	}
	scanf("%d", &n);
	for (int i = 1; i <= n; i++) {
		scanf("%d%d", &a[i], &b[i]);
		f[2001 - a[i]][2001 - b[i]]++;
	}
	for (int i = 1; i <= 4001; i++)
		for (int j = 1; j <= 4001; j++)
			f[i][j] = (f[i][j] + (f[i - 1][j] + f[i][j - 1]) % mod) % mod;
	long long ans = 0;
	for (int i = 1; i <= n; i++) {
		ans = (ans + f[2001 + a[i]][2001 + b[i]]) % mod;
		ans = (ans + mod - C(a[i] * 2 + b[i] * 2, a[i] * 2)) % mod;
	}
	ans = ans * inv[2] % mod;
	printf("%lld\n", ans);
	return 0;
}