#15436: TLE求幫助...


a22102615 (Matsuri)


#include<iostream>
using namespace std;
int main(void)
{
int b,c;
while (cin >> b >> c)
{
while (1)
{
if (b > c) { b -= c; }
else { c -= b; }
if (b == c) { break; }
}
cout << b << endl;
}
}