#include <iostream>
using namespace std;
int RecurseDivision(int length, int width) {
int t;
if (length == width) {
return length;
}
else {
if (length < width)
{
length += width;
width = length - width;
length -= width;
cout << 1;
}
if (length % width == 0)
t = width;
else
t = length % width;
return RecurseDivision(width, t);
}
}
int main() {
int l=6666,w=666;
cout<<"长方形的长为:"<<l<<"\n长方形的宽为:"<<w<<"\n最大的方形边长为:";
cout<<RecurseDivision(l,w);
return 0;
}