hdu 2104

#include <iostream>
using namespace std;
int gcd(int a,int b)
{
    return (b?gcd(b,a%b):a);
}
int main()
{
    int m,n;
    while(cin>>m>>n&&m+n!=-2)
    {
        if(gcd(m,n)==1)  cout<<"YES\n";
        else cout<<"POOR Haha\n";
    }
    return 0;
}
//hdu 2104

posted @ 2014-12-12 18:05  __夜风  阅读(207)  评论(0编辑  收藏  举报