import java.util.Scanner;
public class Euclid {
static public void main(String[] argh){
System.out.print("Enter two numbers: ");
Scanner input = new Scanner(System.in);
int a = input.nextInt();
int b = input.nextInt();
int TEMP = 0 ;
int GCD = 0;
int max = a>b?a:b;
int min = a<b?a:b;
while(min!=0){
TEMP=(max%min);
GCD = min ;
min = TEMP;
}
System.out.print("("+GCD+")");
}
}