#include <cstdio>

int main() {
    char a[100];
    while (~scanf("%s", a)) {
        bool flag = false;
        for (int i = 0;a[i];i++) {
            if (a[i] == '9') flag = true;
        }
        if (flag) puts("Yes");
        else puts("No");
    }
}
