Microsoft Hearts is a classical game of Microsoft Windows. Let's look at Microsoft Hearts of 2 players.
Each player has $$$n$$$ cards initially. There is one of the four suits on one single card: H-Heart$$$\heartsuit$$$, S-Spade$$$\spadesuit$$$, D-Diamond$$$\diamondsuit$$$, C-Club$$$\clubsuit$$$.
The cards are ranked by the point on it. The smallest is 2, and the greatest is A, in which A stands for 14, T stands for 10, i.e. 2<3<4<5<6<7<8<9<T<J<Q<K<A.
The game has following rules.
Each round, the player who has the token would put one of his/her card out. Then the other player can play as following restrictions.
At the end, when players put all 13 cards out, a player's score is the number of HEART cards of his/her scoring area. The player with minor score wins. If the scores are the same, Alice wins.
Additional, we don't consider the "Shoot the Moon" of Spade$$$\spadesuit$$$ Q. Just follow the rules above.
Now, Alice and Bob are playing a Microsoft Hearts of 2 players. Both of them know the cards of each other. At the beginning, Alice has the token to put the card out first.
Alice wants to know, if both of them play the game optimally for themselves, whether she will win the game. Output "Yes" or "No".
The first line contains a single positive integer $$$n\ (n\le 13)$$$, denoting the number of cards of one player.
The following two lines, each line contains $$$n$$$ strings, denoting Alice's and Bob's cards, respectively. The string contains the rank and the suit. For example "7H" stands for $$$\heartsuit7$$$, "TS" stands for $$$\spadesuit10$$$.
Print one single line.
If Alice wins, print "Yes". Otherwise, print "No".
3 AH JH 7S 3H TD 5H
No