You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
417 B

2 years ago
#include <stdio.h>
//ѧ<><D1A7>շת<D5B7><D7AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD><D4BC>
//https://blog.csdn.net/chen_zan_yu_/article/details/82943306
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Լ<EFBFBD><D4BC>
long long gcd(long long x,long long y)
{
long long z = y;
while(x%y!=0)
{
z = x%y;
x = y;
y = z;
}
return z;
}
int main(void) {
long long a, b, c;
scanf("%lld%lld", &a, &b);
c = gcd(a, b);
b = b / c;
if (c % b == 0)
printf("Yes\n");
else
printf("No\n");
return 0;
}