#include<iostream>
#include<conio.h>
using namespace std;
class BozorgtarinMoghsumClass
{
	private :
		int z;
	public :
		int x, y;
		void Calculate()
		{
			while(y > 0)
			{
				z = x % y;
				x = y;
				y = z;
			}
		}
};

int main()
{
	BozorgtarinMoghsumClass A;
	cout << "2 adad ra be tartib vared konid : ";
	cin >> A.x >> A.y;
	A.Calculate();
	cout << "Natije = " << A.x << endl;
	getch();
}

