A. ultmaster 的小迷妹们
Time limit per test: 2.0 seconds
Memory limit: 256 megabytes
ultmaster 男神和他的小迷妹们准备躺在图书馆前大草坪享受惬意的午后。
有强迫症的 ultmaster 想要使得自己和小迷妹们正好躺成一块完整的正方形,ultmaster 想知道能否挑出一些小迷妹(至少一个)实现他的愿望。
已知 ultmaster 的形状 n×n 的正方形,小迷妹的形状为 x×y 的长方形(可以横着或者竖着躺)。若能够则输出Yes
否则输出 No
。
P.S. ultmaster 是正方形因为他比较肥。
Input
第一行三个整数 n,x,y(1≤n,x,y≤109) 分别表示描述中的 n,x,y。
Output
输出一行字符串,Yes
或 No
表示 ultmaster 能否实现他的愿望。
Examples
Input
1 1 2
Output
Yes
Input
1 2 2
Output
No
Note
样例一:可以构成 3×3 的正方形。
#include<bits/stdc++.h>
const int N=1e5+10;
#define ll long long
using namespace std;
int main(){
//freopen("in.txt","r",stdin);
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n,x,y;
cin>>n>>x>>y;
if(n%__gcd(x,y)==0)cout<<"Yes\n";
else cout<<"No\n";
}