#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 (a,b,c,d)(a,b,c,d) to be "Yuyan Dingzhen" (浴眼盯真) if and only if:

  • The first letters of aa and bb are both y\texttt{y}.
  • cc is exactly equal to ding\texttt{ding}.
  • dd is exactly equal to zhen\texttt{zhen}.

Given four space-separated strings a,b,c,da,b,c,d, guaranteed to contain only lowercase English letters, you need to determine whether (a,b,c,d)(a,b,c,d) is "Yuyan Dingzhen" (浴眼盯真).

Input Format

This problem contains multiple test cases.

The first line contains an integer TT, representing the number of test cases.

The next TT lines each contain four space-separated strings a,b,c,da,b,c,d.

Output Format

For each test case, output one line.

If (a,b,c,d)(a,b,c,d) 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 44.
  • Subtask 2 (50 pts): no special restrictions.

For 100%100\% of the data, 1T1001\leq T\leq 100, and each string has length at most 1010.

Translated by ChatGPT 5