Provided is a compound having a superior PKC inhibitory action, and useful as a prophylactic or therapeutic agent for immune diseases, inflammatory diseases and the like, or a salt thereof. A compound represented by the formula (I):wherein each symbol is as described in the DESCRIPTION, or a salt thereof has a superior PKC inhibitory action, and is useful as a prophylactic or therapeutic agent for immune diseases, inflammatory diseases and the like.