Eichler-Selberg relations for singular moduli