The military academy is placing cadets in rows for the parade. All rows must have the same number of cadets. If A company has 64 cadets and B company has 80 cadets, what is the greatest number of cadets who can be in each row?