#include<stdio.h>
int main()
{
	int i, x, y, t, flag = 0;
	printf("2 adad ra be tartib vared konid : ");
	scanf("%d %d", &x, &y);
	if (x > y) //swap x , y
	{
		t = x;
		x = y;
		y = t;
	}
	for (i=x; i >= 1 && !flag; i--)
	{
		if ((y % i == 0) && (x % i == 0))
			flag = 1;
	}
	printf ("Natije = %d", i+1);//dar badtarin halat hatman adade 1 javab ast
	getch();
}

