Provided is a heterocyclic amide compound that may have a PRS inhibitory action and is expected to be useful as a prophylactic or therapeutic agent for PRS associated diseases and the like including cancer. A compound represented by the following formula (I):wherein a group represented byis a group represented by the following formula (II) or the following formula (III):and other symbols are as described in the DESCRIPTION, or a salt thereof.