A compound represented by the following general formula (1a) or (1b), a liquid crystal composition containing the compound, and a polymer obtained by polymerizing the compound or the composition: wherein R1 represents a fluorine atom, an alkyl group or the like; Y1 and Y2 each independently represents alkylene or the like; A1, A2, B1 and B2 each independently represents 1,4-cyclohexylene, 1,4-phenylene or the like; X1 and X2 each independently represents a single bond, —COO—, —OCO— or the like; m represents 0, 1 or 2; and G represents hydrogen, methyl or the like.