An exterior angle and an interior angle of a regular polygon are in the ratio 2:7. Find the number of sides in the polygon.