题目:
AC代码:
import java.util.Scanner;
public class T2104 {
public static int check(int n,int m){
if(m==0)return n;
return check(m ,n%m);
}
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
while(sc.hasNext()){
int n=sc.nextInt();
int m=sc.nextInt();
if(n==-1&&m==-1){
break;
}else{
System.out.println((check(n,m)!=1)?"POOR Haha":"YES");
}
}
}
}