#include <iostream>
using namespace std;
int main() {
long long P;
int K, t;
scanf("%lld %d",&P,&K);
bool check = true;
for (int i = 2; i < K; i++) {
if (P % i == 0) {
check = false;
t = i;
break;
}
}
if (check == false)
printf("BAD %d",t);
else
printf("GOOD");
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: