#include <iostream>                                                                                                                                                                                         
#include <algorithm>                                                                                                                                                                                        
#include <cstring>                                                                                                                                                                                          
#include <vector>                                                                                                                                                                                           
using namespace std;                                                                                                                                                                                        
                                                                                                                                                                                                            
typedef long long ll;                                                                                                                                                                                       
int main()                                                                                                                                                                                                  
{                                                                                                                                                                                                           
    string N;                                                                                                                                                                                               
    cin >> N;                                                                                                                                                                                               
                                                                                                                                                                                                            
    if (N[0] ==  '9' || N[1] == '9')                                                                                                                                                                        
        cout << "Yes" << endl;                                                                                                                                                                              
    else cout << "No" << endl;                                                                                                                                                                              
}                                                                                                                                                                                                           
     

Measured memory_bytes: 256