#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\n"; return 0; } } cout << "No\n"; }