"use strict";
    
const main = arg => {
    arg = arg.split("\n")[0].split(" ");
    const A = arg[0];
    const B = arg[1];
    const C = arg[2];
    
    let temp = 0;
    let i = 1;
    
    while(temp <= 100) {
        temp = A * i;
        if(temp % B === parseInt(C)) {
            console.log("YES");
            return;
        }
        i++;
    }
    
    console.log("NO");
    
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));