WARNING: This page is about a different car, the 2003 Mazda Protege5 and 2003 Mazda Protege. However, it is still accessible from the selected car via links, so may be relevant.
Install the camshaft pulleys, positioning the dowel pins as shown.
Fig 1: Installing Camshaft Pulleys
Courtesy of MAZDA MOTORS CORP.
Hold the camshaft using a wrench on the cast hexagon as shown.
Fig 2: Holding Camshaft Using Wrench On Cast Hexagon