#include <iostream>
#include <chrono>
using namespace std;
typedef unsigned long long ull;
typedef unsigned long long _EuclideanRingElement;
ull nzd(ull a, ull b)
{
if(b==0) return a;
a%=b;
return nzd(b,a);
}
ull n,m;
_EuclideanRingElement __gcd(_EuclideanRingElement __m,
_EuclideanRingElement __n)
{
while (__n != 0) {
_EuclideanRingElement __t = __m % __n;
__m = __n;
__n = __t;
}
return __m;
}
int main() {
ull A = 1100087778366101931ull, B = 1779979416004714189ull;
auto beg = std::chrono::high_resolution_clock::now();
ull a1 = nzd(A, B);
auto mid = std::chrono::high_resolution_clock::now();
ull a2 = __gcd(A, B);
auto en = std::chrono::high_resolution_clock::now();
auto t1 = 1e-9 * std::chrono::duration_cast<std::chrono::nanoseconds>(mid - beg).count();
auto t2 = 1e-9 * std::chrono::duration_cast<std::chrono::nanoseconds>(en - mid).count();
cout.precision(10);
cout << fixed << t1 << " " << t2;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y2hyb25vPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKdHlwZWRlZiB1bnNpZ25lZCBsb25nIGxvbmcgdWxsOwp0eXBlZGVmIHVuc2lnbmVkIGxvbmcgbG9uZyBfRXVjbGlkZWFuUmluZ0VsZW1lbnQ7CnVsbCBuemQodWxsIGEsIHVsbCBiKQp7CglpZihiPT0wKSByZXR1cm4gYTsKCWElPWI7CgkJcmV0dXJuIG56ZChiLGEpOwp9CnVsbCBuLG07CgpfRXVjbGlkZWFuUmluZ0VsZW1lbnQgX19nY2QoX0V1Y2xpZGVhblJpbmdFbGVtZW50IF9fbSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9FdWNsaWRlYW5SaW5nRWxlbWVudCBfX24pCnsKICB3aGlsZSAoX19uICE9IDApIHsKICAgIF9FdWNsaWRlYW5SaW5nRWxlbWVudCBfX3QgPSBfX20gJSBfX247CiAgICBfX20gPSBfX247CiAgICBfX24gPSBfX3Q7CiAgfQogIHJldHVybiBfX207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