Two elements A and B form compounds having formula $AB_2$ and $AB_4$. When dissolved in 20 g of benzene ($C_6H_6$), 1 g of $AB_2$ lowers the freezing point by 2.3 K whereas 1.0 g of $AB_4$ lowers it by 1.3 K. The molar depression constant for benzene is 5.1 K $kg mol^{–1}$. Calculate atomic masses of A and B.