#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main() {
string str;
cin >> str;
int len = str.length();
bool flag = false;
for(int i = 0; i < len; ++i) {
if(str[i] == 'H' || str[i] == 'Q' || str[i] == '9') {
flag = true;
break;
}
}
if(flag) cout << "YES" << endl;
else cout << "NO" << endl;
return 0;
}
133A - HQ9+
最新推荐文章于 2024-04-19 23:32:46 发布