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;
}
while(length%width!=0){
int temp=width;
width=length%width;
length=temp;
}
return width;
}
}