#include using namespace std; using ll=long long; using ull=unsigned long long; using pll=pair; using tll=tuple; using ld=long double; constexpr ll INF=(1ll<<60); #define rep(i,n) for (ll i=0;i<(ll)(n);i++) #define replr(i,l,r) for (ll i=(ll)(l);i<(ll)(r);i++) #define all(v) v.begin(),v.end() #define len(v) ((ll)v.size()) template inline bool chmin(T &a,T b){ if(a>b){ a=b; return true; } return false; } template inline bool chmax(T &a,T b){ if(a T binary_search(auto f,T ok,T ng){ while(1> sa >> sb; ll ax=0,ay=0,bx=0,by=0; bool f=false; for(auto i:sa){ if(i=='.'){ f=true; continue; } if(!f){ ax*=10; ax+=i-'0'; }else{ ay*=10; ay+=i-'0'; } } f=false; ll z=1; for(auto i:sb){ if(i=='-'){ z=-1; continue; } if(i=='.'){ f=true; continue; } if(!f){ bx*=10; bx+=i-'0'; }else{ by*=10; by+=i-'0'; } } if(bx==0&&by==0){ cout << "Yes\n"; return 0; } if(z==-1){ ll a=ax*10000+ay; ll b=bx*10000+by; b=-b; if(b==0||a==10000) cout << "Yes\n"; else cout << "No\n"; }else{ ll a=ax*10000+ay; ll b=bx*10000+by; bool ok=true; ll p=10000/gcd(10000,b); ll x=10000/gcd(10000,a); map mp; for(ll i=2;i*i<=x;i++){ ll cnt=0; while(x%i==0){ x/=i; cnt++; } if(cnt%p!=0) ok=false; mp[i]=cnt; } if(x!=1){ if(p!=1) ok=false; mp[x]=1; } x=a/gcd(10000,a); map mp2; for(ll i=2;i*i<=x;i++){ ll cnt=0; while(x%i==0){ x/=i; cnt++; } if(cnt%p!=0) ok=false; mp2[i]=cnt; } if(x!=1){ if(p!=1) ok=false; mp2[x]=1; } for(auto [k,v]:mp){ if(!mp2.contains(k)||mp2[k]