"use strict";
    
const main = arg => {
    arg = arg.split("\n")[0].split(" ");
    const A = arg[0];
    const B = arg[1];
    const C = arg[2];
    
    let flg = false;
    
    for(let i=0; i<B; i++) {
        if((A * i - C) % B === 0) {
            flg = true;
        }
    }
    
    console.log(flg ? "YES" : "NO");
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));

