#include<stdio.h>
int gcd(int x,int y)
{
	return !y?x:gcd(y,x%y);//如果y=0,输出x,否则递归取余直到y=0
}
int main()
{
	int x,y;
	scanf("%d %d",&x,&y);
	printf("最大公约数:%d\n",gcd(x,y));
	return 0;
}