题库练习 HQ
← 上一题 下一题 →

A8886 | HQ

时间限制1s
内存限制256MB
通过 / 提交0/0

题目描述

The famous joke programming language HQ9+ has only 4 commands. In this problem we will explore its subset — a language called HQ...

输入格式

The only line of the input is a string between $1$ and $10^{6}$ characters long.

输出格式

Output "Yes" or "No".

输入输出样例

输入 #1
HHHH
输出 #1
Yes
输入 #2
HQHQH
输出 #2
No
输入 #3
HHQHHQH
输出 #3
No
输入 #4
HHQQHHQQHH
输出 #4
Yes
C++ 编辑器
输入
输出