#include using namespace std; int main() { long a,b,r,h,k; cin>>a>>b; h=a; k=b; while(k!=0) { r=h%k; h=k; k=r; } if(h==1) cout<