#include using namespace std; void fast_io() { ios_base::sync_with_stdio(false); cin.tie(0); } int main() { fast_io(); string n; cin >> n; if (all_of(n.begin(), n.end(), [](char x) { return x == '9'; })) { cout << "Yes\n"; } else { cout << "No\n"; } }