import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner s = new Scanner(System.in);
int M = s.nextInt();
int N = s.nextInt();
if(M%N==0&&M>=1&&N<=500){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}