#include <stdio.h>
int main(){
     int a,b,c;
     scanf("%d %d%d",&a,&b,&c);
     int k=1;
     while(1){
        if(k*a%b==c) {
            printf("YES");
            break;
        }
        if(k*a%b==0){
            printf("NO");
            break;
        }
        k++;
     }
    return 0;
}
