P9459 "EZEC-14" Yuyan Dingzhen

Background

The testdata checker提示: the testdata for this problem is generated on Windows, so the line ending is ``\r\n``.

Description

dXqwq defines a string quadruple $(a,b,c,d)$ to be "Yuyan Dingzhen" (浴眼盯真) if and only if: - The first letters of $a$ and $b$ are both $\texttt{y}$. - $c$ is exactly equal to $\texttt{ding}$. - $d$ is exactly equal to $\texttt{zhen}$. Given four space-separated strings $a,b,c,d$, guaranteed to contain only lowercase English letters, you need to determine whether $(a,b,c,d)$ is "Yuyan Dingzhen" (浴眼盯真).

Input Format

This problem contains multiple test cases. The first line contains an integer $T$, representing the number of test cases. The next $T$ lines each contain four space-separated strings $a,b,c,d$.

Output Format

For each test case, output one line. If $(a,b,c,d)$ is "Yuyan Dingzhen" (浴眼盯真), output ``Yes``; otherwise output ``No``.

Explanation/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 $4$. - Subtask 2 (50 pts): no special restrictions. For $100\%$ of the data, $1\leq T\leq 100$, and each string has length at most $10$. ![](https://cdn.luogu.com.cn/upload/image_hosting/qvr810ap.png) Translated by ChatGPT 5