#P9459. 「EZEC-14」浴眼盯真
「EZEC-14」浴眼盯真
Background
The testdata checker提示: the testdata for this problem is generated on Windows, so the line ending is \r\n.
Problem Description
dXqwq defines a string quadruple to be "Yuyan Dingzhen" (浴眼盯真) if and only if:
- The first letters of and are both .
- is exactly equal to .
- is exactly equal to .
Given four space-separated strings , guaranteed to contain only lowercase English letters, you need to determine whether is "Yuyan Dingzhen" (浴眼盯真).
Input Format
This problem contains multiple test cases.
The first line contains an integer , representing the number of test cases.
The next lines each contain four space-separated strings .
Output Format
For each test case, output one line.
If is "Yuyan Dingzhen" (浴眼盯真), output Yes; otherwise output No.
5
yi yan ding zhen
yu yan ding zhen
zheng tai ding zhen
yin yang guai qi
you xiu su zhi
Yes
Yes
No
No
No
Hint
Sample Explanation
The first two test cases satisfy all requirements.
The 3rd and 5th test cases do not satisfy the first requirement.
The 4th and 5th test cases do not satisfy the 2nd and 3rd requirements.
Constraints
This problem uses bundled judging.
- Subtask 1 (50 pts): all input strings are guaranteed to have length .
- Subtask 2 (50 pts): no special restrictions.
For of the data, , and each string has length at most .

Translated by ChatGPT 5