#include <iostream>
using namespace std;
int gcd(int a, int b) {
if (!b)
return a;
else
return gcd(b, a % b);
}
int main() {
cout << gcd(5, 0);
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IGdjZChpbnQgYSwgaW50IGIpIHsKICAgIGlmICghYikKICAgICAgICByZXR1cm4gYTsKICAgIGVsc2UKICAgICAgICByZXR1cm4gZ2NkKGIsIGEgJSBiKTsKfQoKaW50IG1haW4oKSB7Cgljb3V0IDw8IGdjZCg1LCAwKTsKfQ==