A compound and pharmaceutically acceptable salts thereof for treating cancer, having a structure represented by the following formula (I) or formula (II):in which X and Y each individually represent:R1, R2, R3, R4, and R5 individually represents hydrogen atom, acyl having 20 or less carbon atoms, alkyl having 20 or less carbon atoms, alkanoyl having 20 or less carbon atoms, aroyl having 20 or less carbon atoms, aryl having 20 or less carbon atoms, aralkyl having 20 or less carbon atoms, sulfonyl having 20 or less carbon atoms, phosphonyl having 20 or less carbon atoms, or haloacyl having 20 or less carbon atoms.