console.log((args=>{
  let [A,B,C] = args.trim().split` `.map(v=>v|0);
  let a = 0;
  for ( let i = 0; i < B; i++ ) {
    a += A % B;
    a %= B;
    if ( a === C ) return 'YES';
  }
  return 'NO';
})(require('fs').readFileSync('/dev/stdin', 'utf8')));
