#include <iostream>
#include <vector>

using namespace std;

int main () 
{
	
	int n;
	cin >> n;
	
	vector<int> x(n);
	vector<int> y(n);
	
	int brojacx0 = 0;
	int brojacy0 = 0;
	
	for (int i = 0; i < n; i++) {
		cin >> x[i] >> y[i];
		if (x[i] == 0) {
			brojacx0++;
		}
		if (y[i] == 0) {
			brojacy0++;
		}
	}
	if (brojacx0 == n) {
		int p1 = 0;
		int p2 = 0;
		
		for (int i = 0; i < n; i++) {
			if (y[i] < 0) {
				p1++;
			}
			else {
				p2++;
			}
		}
		if (p1 == 0) {
			cout << p2 <<"\n";
			return 0;
		}
		if (p2 == 0) {
			cout << p1 <<"\n";
			return 0;
		}
		cout << p1 * p2 <<"\n";
		return 0;
	}
	if (brojacy0 == n) {
		int p1 = 0;
		int p2 = 0;
		
		for (int i = 0; i < n; i++) {
			if (x[i] < 0) {
				p1++;
			}
			else {
				p2++;
			}
		}
		if (p1 == 0) {
			cout << p2 <<"\n";
			return 0;
		}
		if (p2 == 0) {
			cout << p1 <<"\n";
			return 0;
		}
		cout << p1 * p2 <<"\n";
		return 0;
	}
	
	return 0;
}