#include<iostream>
using namespace std;
int gcd(int x,int y)
{
cout<<"gcd("<<x<<","<<y<<") ";
if(x%y==0) return y;
if(x>y) gcd(y,x%y);
else if(x<y) gcd(y,x);
}
int main()
{
int a,b;
cin>>a>>b;
cout<<gcd(a,b);
return 0;
}
03-18
1058
04-03
3012
04-26
618