#include using namespace std; //#include //using namespace atcoder; using ll=long long; using Graph=vector>; #define MAX 1000000 #define MOD 1000000009 //#define MOD 998244353 #define INF 1000000000 //#define INF 1000000000000000000 ll gcd(ll A,ll B){ while(A%B!=0){ ll tmp=A%B; A=B; B=tmp; } return B; } int main(){ ll N,M; cin>>N>>M; ll g=gcd(N,M); N/=g; M/=g; if(M==1){ while(N%10==0){ N/=10; } cout<1){ cout<<-1<0){ cout<<5<