import java.io.*; class gcd1 { public rational1(){} public long gcd11(long a,long b) { if(b==0) return a; else return gcd11(b,a%b); } } public class gcd { public static void main(String args[])throws IOException { gcd1 r=new gcd1(); long a,b,x,y; String str; DataInputStream in= new DataInputStream(System.in); System.out.println("Enter the value for A"); str=in.readLine(); a=Integer.parseInt(str); System.out.println("Enter the value for B"); str=in.readLine(); b=Integer.parseInt(str); long l=r.gcd11(a,b); System.out.println(); System.out.println("The GCD of the number is:"+l); } }