"use strict";
const main = (input) => {
  const [a, b] = input.trim().split("").map(Number);
  return a === 9 || b === 9 ? "Yes" : "No";
};

console.log(main(require("fs").readFileSync("/dev/stdin", "utf8")));
