#include #include #include #include #include #include #include int main(){ int table[100][100]={0};//[r][c] int n; scanf("%d",&n); int i; int r,c; int canPutMatches=1; for(i=0;i<2*n;i++){ scanf("%d %d",&r,&c); table[r-1][c-1]++; if(table[r-1][c-1]>=3){ canPutMatches=0; break; } } if(canPutMatches){ puts("YES"); }else{ puts("NO"); } return 0; }