function Main(input) {
  const numbers = input.split('').map(n => Number(n));
  if (numbers[0] === 9 || numbers[1] === 9) {
    console.log('Yes');
  } else {
    console.log('No');
  }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));