class Main {
public static void main(String[] args) {
int side = divideToSquare(640, 400);
System.out.println(side);
}
public static int divideToSquare(int length,int width){
if(length<width||width<=0||length<=0){
System.out.println("数据不正确");
return -1;
}
if(length%width==0){
return width;
}
return divideToSquare(width,length%width);
}
}