#abc243c. [abc243_c]Collision 2

[abc243_c]Collision 2

Problem Statement

There are NN people in an xyxy-plane. Person ii is at (Xi,Yi)(X_i, Y_i). The positions of all people are different.

We have a string SS of length NN consisting of L and R.
If Si=S_i = R, Person ii is facing right; if Si=S_i = L, Person ii is facing left. All people simultaneously start walking in the direction they are facing. Here, right and left correspond to the positive and negative xx-direction, respectively.

For example, the figure below shows the movement of people when $(X_1, Y_1) = (2, 3), (X_2, Y_2) = (1, 1), (X_3, Y_3) =(4, 1), S =$ RRL.

image

We say that there is a collision when two people walking in opposite directions come to the same position. Will there be a collision if all people continue walking indefinitely?

Constraints

  • 2leqNleq2times1052 \\leq N \\leq 2 \\times 10^5
  • 0leqXileq1090 \\leq X_i \\leq 10^9
  • 0leqYileq1090 \\leq Y_i \\leq 10^9
  • (Xi,Yi)neq(Xj,Yj)(X_i, Y_i) \\neq (X_j, Y_j) if ineqji \\neq j.
  • All XiX_i and YiY_i are integers.
  • SS is a string of length NN consisting of L and R.

Input

Input is given from Standard Input in the following format:

NN X1X_1 Y1Y_1 X2X_2 Y2Y_2 vdots\\vdots XNX_N YNY_N SS

Output

If there will be a collision, print Yes; otherwise, print No.


Sample Input 1

3
2 3
1 1
4 1
RRL

Sample Output 1

Yes

This input corresponds to the example in the Problem Statement.
If all people continue walking, Person 22 and Person 33 will collide. Thus, Yes should be printed.


Sample Input 2

2
1 1
2 1
RR

Sample Output 2

No

Since Person 11 and Person 22 walk in the same direction, they never collide.


Sample Input 3

10
1 3
1 4
0 0
0 2
0 4
3 1
2 4
4 2
4 4
3 3
RLRRRLRLRR

Sample Output 3

Yes