ll@t; rep(t){ ll@a,@b;char@c;ll@d,@e;char@f; ll g=(d-a)*((c=='R')-(c=='L'))+(e-b)*((c=='U')-(c=='D')); ll h=(a-d)*((f=='R')-(f=='L'))+(b-e)*((f=='U')-(f=='D')); wt(g<=0|g-h|(c+f==158?b-e:c+f==153?a-d:0)?"No":"Yes"); }