mirror of
https://github.com/tiennm99/codeforces.git
synced 2026-06-09 10:12:55 +00:00
21 lines
325 B
C++
21 lines
325 B
C++
#include <iostream>
|
|
#include <cstdlib>
|
|
#include <string>
|
|
|
|
using namespace std;
|
|
|
|
int main()
|
|
{
|
|
char c[] = "HQ9";
|
|
string s;
|
|
cin >> s;
|
|
for (int i = 0; i < 3; i++) {
|
|
if (s.find(c[i]) != -1) {
|
|
cout << "YES" << endl;
|
|
exit(0);
|
|
}
|
|
}
|
|
cout << "NO" << endl;
|
|
return 0;
|
|
}
|