#include<iostream>
#include<conio.h>
using namespace std;
class KochektarinMazrabMoshtarakClass
{
	public :
		int x, y;
		int IsMazrab(int num)
		{
			if(num % y != 0)
				return 1;
			else
				return 0;
		}
};

int main()
{
	KochektarinMazrabMoshtarakClass A;
	int i;
	cout << "2 adade vorodi ra be tartib vared konid : ";
	cin >> A.x >> A.y;
	for(i = A.x; A.IsMazrab(i) == 1; i += A.x)
		;
	cout << "Kochektarin Mazrab Moshtarak = " << i << endl;
	getch();
}

