Problem

Source: 2014 Saudi Arabia GMO TST I p3

Tags: rectangle, combinatorics, combinatorial geometry, square



Turki has divided a square into finitely many white and green rectangles, each with sides parallel to the sides of the square. Within each white rectangle, he writes down its width divided by its height. Within each green rectangle, he writes down its height divided by its width. Finally, he calculates $S$, the sum of these numbers. If the total area of white rectangles equals the total area of green rectangles, determine the minimum possible value of $S$.