Provided is a compound useful for the prophylaxis or treatment of cancer.The present invention relates to a compound represented by formula (I):wherein each symbol in the formula is as defined in the specification, or a salt thereof or a prodrug thereof, which is useful for the prophylaxis or treatment of cancer.