#include using namespace std; int main(){ int N; cin >> N; for(int i = 0; i < N; i++){ int v, w; cin >> v >> w; if(w == 1){ cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }