#include using namespace std; #define ll long long #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int n; cin>>n; std::vector v,w ; bool ans=false; rep(i,n){ cin>>v[i]>>w[i]; if(w[i]==1)ans=true; } cout<<(ans?"Yes":"No")<