Similarities and Differences between LaNiO2 and CaCuO2 and Implications for Superconductivity