import std.stdio;
import std.algorithm;
import std.range;
import std.string;
import std.conv;
import std.math;

static long[long] memo;

void main()
{
	int N = readln.chomp.to!int();
	int[] A;
	int[] B;
	foreach(i;0 .. N)
	{
		int[] tmp = readln.chomp.split(' ').map!(to!int).array;
		A ~= tmp[0];
		B ~= tmp[1];
	}
	long result;
	foreach(j;0 .. N)
	{
		foreach(k; j+1 .. N)
		{
			int a = A[j] + A[k];
			int b = B[j] + B[k];
			result = (result + (factorial(a+b) / (factorial(a) * factorial(b) ) ) % (10 ^^ 9 + 7) );
		}
	}
	writeln(result);
}
long factorial(long n, long s = 1){
	if(n in memo)
	{
		return memo[n];
	} else {
		long result = fact(n);
		memo[n] = result;
		return result;
	}
  
}
long fact(long n, long s = 1)
{
	return n == 0 ? s : fact (n - 1, s * n);
}