#include using namespace std; int main(){ int N; cin >> N; while(N--){ int v, w; cin >> v >> w; if(w == 1) return puts("Yes") & 0; } puts("No"); }