In a dihybrid cross, how are the genotype and phenotype ratios determined?