#include<bits/stdc++.h>
using namespace std;
bitset<101> acc[201];
int dir[201], nxt[201], tmp[201];
int main() {
	int n;
	cin >> n;
	for (int i = 1; i <= n * 2; i++) acc[i] = ~acc[i];
	for (int i = 1; i <= n; i++) {
		int a, b;
		cin >> a >> b;
		if (a != -1 && b != -1 && a >= b) {
			puts("No");
			return 0;
		}
		if (a != -1) {
			if (dir[a]) {
				puts("No");
				return 0;
			}
			dir[a] = 1;
		}
		if (b != -1) {
			if (dir[b]) {
				puts("No");
				return 0;
			}
			dir[b] = -1;
		}
		if (a != -1 && b != -1) {
			tmp[a] = tmp[b] = 1;
			for (int j = 1; j <= n; j++)
				if (j != b-a) acc[a][j] = acc[b][j] = 0;
		}
	}
	for (int i = 1; i <= n * 2; i++)
		if (!tmp[i] && dir[i]) {
			if (dir[i] == 1) {
				for (int j = 1; j <= n; j++)
					if (i + j > n * 2 || dir[i+j]) acc[i][j] = 0;
			}
			if (dir[i] == -1) {
				for (int j = 1; j <= n; j++)
					if (i - j <= 0 || dir[i-j]) acc[i][j] = 0;
			}
		}
	nxt[0] = 1;
	for (int i = 2; i <= n * 2; i += 2) {
		for (int j = 1; j <= i / 2; j++) {
			bool tmp = 1;
			for (int k = i; k > i - j; k--)
				if (dir[k] == 1 || !acc[k][j]) tmp = 0;
			for (int k = i - j; k > i-j*2; k--)
				if (dir[k] == -1 || !acc[k][j]) tmp = 0;
			if (tmp && nxt[i-2*j]) {
				nxt[i] = 1;
				break;
			}
		}
	}
	if (nxt[n*2]) puts("Yes");
	else puts("No");
}
#include <bits/stdc++.h>
using namespace std;

int main(){
    int n;
    cin >> n;
    vector<pair<int, int>> p(n);
    for(auto& [x, y] : p) cin >> x >> y;
    for(int i = n; i--; ) for(int j = i; j--; ) for(int k = j; k--; ){
        auto [x1, y1] = p[i];
        auto [x2, y2] = p[j];
        auto [x3, y3] = p[k];
        x1 -= x3;
        x2 -= x3;
        y1 -= y3;
        y2 -= y3;
        if(x1 * y2 == x2 * y1){
            puts("Yes");
            return 0;
        }
    }
    puts("No");
}
