#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <set>
#include <map>
#include <queue>
#include <cmath>
#include <iomanip>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i=0;i < (int)(n);i++)

void sol(){
    string s;
    cin >> s;
    int n = s.size();
    bool yes = true;
    for (int i = 0; i < n;i++){
        if (s[i] != '9'){
            yes = false;
            break;
        }
    }
    if (yes) cout << "Yes\n";
    else cout << "No\n";
    return;
}

int main(){
    int test = 1;
    //cin >> test;
    while(test--){
        sol();
    }
}