Checkers
时间限制:C/C++/Rust/Pascal 2秒,其他语言4秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

There are N black checker pieces on the coordinate plane. The i-th checker piece is located at point . You are playing a new type of game with these checker pieces.

A move is defined as follows :

- Place a white checker piece W at some coordinate (2x, y) where x, y are integers. While there exist a black checker piece B at distance exactly 1 from W, you may choose to capture B by moving W to the symmetric point of its current position with respect to B, and remove B. Note that multiple checker pieces may occupy the same point at the same time. Once no such operation is possible or you choose to stop performing such operation, W is removed.

Each black checker piece has a 1/2 probability of getting removed before the game starts. What is the expected minimum number of moves required to complete the game? Let E be this expected value. It can be proven that  is an integer. Output 

输入描述:

The first line of input contains a single integer N (1 <= N <= 600).

The next N lines contains 2 space-separated integers Xi, Yi (0 <= Xi <= 99, 0 <= Yi <= 5), denoting the coordinates of the checker pieces.

输出描述:

Output a single integer, the value of E * 2N mod 1000000007.
示例1

输入

复制
2
1 2
2 3

输出

复制
3