using System;
using System.Collections.Generic;
using System.Text;

namespace EA
{
class Program
{
static void Main(string[] args)
{
System.Console.WriteLine(Euclidean(66666662, 6666666666666652));
}


public static string Euclidean(int aa, int bb)
{
int d=0;
while (bb != 0)
{
d = bb;
bb = aa % bb;
aa = d;
}
return d.ToString();
}
}

}