#include using namespace std; int main() { int t,ck=1; cin>>t; while(t--){ int x,y; cin>>x>>y; if( x!=0 && y!=0 ){ ck=0; } } if(ck==0){ printf("NO\n"); } else if(ck==1) cout<<"YES"<