Problem Description
An engineering firm called ``Gears R Us" needs a program which can evaluate the operation of gears on a board. The board is a two-dimensional mounting plane which allows gears with two levels of teeth (an inside radius closest to the board and an outside radius away from the board). The gears rotate around the center of their diameter and interact by turning an adjacent gear which it touches (either on the inside or outside radiuss) with a equal tangential velocity. Angular velocity is the same for both the inside and outside radius gears.
``Gears R Us" uses square mounting boards which have a 300×300 grid of mounting holes on 1 cm centers. When viewing the board, the lower left of the board is position x = 1, y = 1; the upper right of the board is position x = 300, y = 300. The gears mount only on mounting holes and are available with integer inside a