In triangle ABC shown below, point G is the intersection of all the medians. If the length of AP is 18 cm, then the length of AG and GP respectively are: