// countm.cpp : Defines the entry point for the console application.
//
#include
#include
#include
#include
using namespace std;
struct Point{
int x;
int y;
Point(int x_, int y_ ) {
x = x_;
y = y_;
}
bool operator < (Point& other){
return y < other.y;
}
};
int main() {
ifstream in("countm.in");
ofstream out("countm.out");
int n;
const long module = 1000000007;
in>>n;
vector v;
long x,y;
for ( int i = 0 ; i < n ; i ++ ) {
in>>x>>y;
v.push_back(Point(x,y));
}
sort(v.begin(), v.end() );
long cnt = 0;
long size = v.size();
for ( vector::iterator first = v.begin(); first != v.end() ; first++ ){
for ( vector::iterator second = first + 1; second != v.end() ; second++) {
if (second->x == first->x){
continue;
}
for ( vector::iterator third = second + 1; third != v.end() ; third++ ){
if ( third->x == first->x || third->x == second->x ){
continue;
}
for ( vector::iterator fourth = third + 1; fourth != v.end(); fourth ++ ){
if ( fourth->x == third->x || fourth->x == second->x || fourth->x == first->x ){
continue;
}
for ( vector::iterator fifth = fourth + 1; fifth != v.end(); fifth++ ){
if ( fifth->x != fourth->x && fifth->x != third->x && fifth->x != second->x && fifth->x != first->x ){
++cnt;
}
}//end of fifth cycle
cnt = cnt % module;
}//end of fourth cyclle
}//end of third cycle
}//end of second cycle
}//end of first cycle
out<