显示代码纯文本
#include<bits/stdc++.h>
#define ull unsigned long long
#define ll long long
using namespace std;
int tc;
int gcd(int x,int y)
{
if(x<y) swap(x,y);
while(y)
{
x%=y;
swap(x,y);
}
return x;
}
int main()
{
freopen("noi_online2020_color.in","r",stdin);
freopen("noi_online2020_color.out","w",stdout);
cin>>tc;
int s1,s2,s3,s4;
int p;
for(int i=1;i<=tc;i++)
{
scanf("%d%d%d",&s1,&s2,&s3);
if(s3<=1)
{
printf("No\n");
continue;
}
// if(i==50)
// {
// cout<<s1<<" "<<s2<<" "<<s3<<endl;
// }
s4=gcd(s1,s2);
s1/=s4;
s2/=s4;
if(s1<s2) swap(s1,s2);
p=s1/s2;
if(s1%s2>1) p++;
else if(s1%s2==0) p--;
// if(i==336) cout<<"336: ";
if(p>=s3) printf("No\n");
else printf("Yes\n");
}
return 0;
}