package suxueyuanli;
import java.util.Scanner;
public class Gcd {
public static void main(String[] args) {
System.out.println("请输入两个正整数:");
@SuppressWarnings("resource")
Scanner scan = new Scanner(System.in);
@SuppressWarnings("resource")
Scanner scan2=new Scanner(System.in);
int X=scan.nextInt();
int Y=scan2.nextInt();
int sum=0;
for(int i=1;i<X;i++) {
sum=X/i;
if(X%i==0&Y%sum==0) {
System.out.println(+X+"与"+Y+"的最大公约数为"+sum);
break;
}
}
}
}