#include <iostream>
using namespace std;
// Function to compute GCD using Euclid's algorithm
int gcd(int a, int b) {
while (b != 0) {
int temp = b;
b = a % b;
a = temp;
}
return a;
}
int main() {
int num1 = 31415;
int num2 = 14142;
// Finding GCD
int result = gcd(num1, num2);
cout << "The GCD of " << num1 << " and " << num2 << " is: " << result << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKLy8gRnVuY3Rpb24gdG8gY29tcHV0ZSBHQ0QgdXNpbmcgRXVjbGlkJ3MgYWxnb3JpdGhtCmludCBnY2QoaW50IGEsIGludCBiKSB7CiAgICB3aGlsZSAoYiAhPSAwKSB7CiAgICAgICAgaW50IHRlbXAgPSBiOwogICAgICAgIGIgPSBhICUgYjsKICAgICAgICBhID0gdGVtcDsKICAgIH0KICAgIHJldHVybiBhOwp9CgppbnQgbWFpbigpIHsKICAgIGludCBudW0xID0gMzE0MTU7CiAgICBpbnQgbnVtMiA9IDE0MTQyOwoKICAgIC8vIEZpbmRpbmcgR0NECiAgICBpbnQgcmVzdWx0ID0gZ2NkKG51bTEsIG51bTIpOwoKICAgIGNvdXQgPDwgIlRoZSBHQ0Qgb2YgIiA8PCBudW0xIDw8ICIgYW5kICIgPDwgbnVtMiA8PCAiIGlzOiAiIDw8IHJlc3VsdCA8PCBlbmRsOwoKICAgIHJldHVybiAwOwp9Cg==