ll@n,@m; unionFind u('m',2n+1); u.init(); rep(m){ ll@a,@b; u(a,b+n); u(a+n,b); if(u(a)==u(a+n)){ wt("No"); exit(0); } } wt("Yes");