import java.io.*;
import java.util.*;
class GCD
{
{
Scanner sc
=new Scanner
(System.
in); System.
out.
println("Enter the numbers"); int a=sc.nextInt();
int b=sc.nextInt();
System.
out.
println("GCD of a and b is "+gcd
(a,b
)); }
static int gcd(int a,int b)
{
if(a%b==0)
return b;
else
return gcd(b,a%b);
}
}
aW1wb3J0IGphdmEuaW8uKjsKaW1wb3J0IGphdmEudXRpbC4qOwpjbGFzcyBHQ0QKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nIGFyZ3NbXSl0aHJvd3MgSU9FeGNlcHRpb24KCXsKCQlTY2FubmVyIHNjPW5ldyBTY2FubmVyKFN5c3RlbS5pbik7CgkJU3lzdGVtLm91dC5wcmludGxuKCJFbnRlciB0aGUgbnVtYmVycyIpOwoJCWludCBhPXNjLm5leHRJbnQoKTsKCQlpbnQgYj1zYy5uZXh0SW50KCk7CgkJU3lzdGVtLm91dC5wcmludGxuKCJHQ0Qgb2YgYSBhbmQgYiBpcyAiK2djZChhLGIpKTsKCX0KCXN0YXRpYyBpbnQgZ2NkKGludCBhLGludCBiKQoJewoJCWlmKGElYj09MCkKCQkJcmV0dXJuIGI7CgkJZWxzZQoJCQlyZXR1cm4gZ2NkKGIsYSViKTsKCX0KfQ==