---
category_name: medium
problem_code: KOL1505
problem_name: 'Jalebi Bai and Decks of Sweets'
languages_supported:
- C
- CPP14
- JAVA
max_timelimit: '1'
source_sizelimit: '50000'
problem_author: admin2
problem_tester: null
date_added: 3-12-2015
tags:
- acm15kol
- admin2
- processing
- string
editorial_url: 'http://discuss.codechef.com/problems/KOL1505'
time:
view_start_date: 1451123700
submit_start_date: 1451123700
visible_start_date: 1451123700
end_date: 1735669800
current: 1493557717
layout: problem
---
All submissions for this problem are available.Jalebi Bai has two decks of sweets. These decks are represented by two strings **s** and **t** consisting of lowercase letters from the English alphabet. Each letter from 'a' to 'z' denotes a single type of sweet, e.g., βbβ denotes Barfi, 'r' denotes Rasgulla, etc. She wants to use these decks in her friend Ladduβs marriage. Instead of graciously accepting the gift, Laddu asks Jalebi Bai to first make the two decks exactly the same, so that they look good while serving. Now Jalebi Bai can apply the following operation as many times as she wants on both the decks.
- From a single deck, pick any two consecutive sweets of the same type and eat one of them. e.g., if a deck is "rrrjj", she can change it to "rrrj" by picking the last two sweets of type 'j' (Jalebi) and eating one of them, or she can change the deck to "rrjj" by picking up the first two sweets of type βrβ and eating one of them.
You need to tell whether Jalebi Bai can make the decks equal by applying the above operation as many times as she wants. Output "Yes" \[without quotes\] if she can, otherwise output "No" \[without quotes\].
### Input
The first line of the input contains an integer **T** denoting the number of test cases. The description of **T** test cases follows.
The first line of each test case contains a string **s**.
The second line of each test case contains a string **t**.
### Output
For each test case, output "Yes" \[without quotes\] or "No" \[without quotes\] depending on the case.
### Constraints
- **1** β€ **T** β€ **50**
- Each character of **s, t** will be between 'a' and 'z'.
- **1** β€ length of string **s** β€ **50**
- **1** β€ length of string **t** β€ **50**
### Example
<pre><b>Input:</b>
2
rrrjj
rrrj
rj
jr
<b>Output:</b>
Yes
No
</pre>### Explanation
**In the first example**,
Jalebi Bai can change the first deck from "rrrjj" to "rrrj" in a single operation, then both the decks will be equal. Example taken from the statements.
**In the second example**,
Jalebi Bai can never make both decks of sweets equal.