mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
16 lines
258 B
C++
16 lines
258 B
C++
|
#include <stdio.h>
|
||
|
int gcd(int a,int b)
|
||
|
{
|
||
|
return b==0?a:gcd(b,a%b);
|
||
|
}
|
||
|
int main()
|
||
|
{
|
||
|
int n,m;
|
||
|
while(scanf("%d%d",&n,&m),n!=-1&&m!=-1)
|
||
|
{
|
||
|
if(gcd(n,m)==1) puts("YES");
|
||
|
else puts("POOR Haha");
|
||
|
}
|
||
|
return 0;
|
||
|
}
|