We present results of classical trajectory calculations on the sticking of hyperthermal CO to the basal plane (0001) face of crystalline ice Ih and to the surface of amorphous ice Ia. The calculations were performed for normal incidence at a surface temperature Ts = 90 K for ice Ia, and at Ts = 90 and 150 K for ice Ih. For both surfaces, the sticking probability can be fitted to a simple exponentially decaying function of the incidence energy, Ei: Ps = 1.0e(-Ei(kJ/mol)/90(kJ/mol)) at Ts = 90 K. The energy transfer from the impinging molecule to the crystalline and the amorphous surface is found to be quite efficient, in agreement with the results of molecular beam experiments on the scattering of the similar molecule, N2, from crystalline and amorphous ice. However, the energy transfer is less efficient for amorphous than for crystalline ice. Our calculations predict that the sticking probability decreases with Ts for CO scattering from crystalline ice, as the energy transfer from the impinging molecule to the warmer surfaces becomes less efficient. At high Ei (up to 193 kJ/mol), no surface penetration occurs in the case of crystalline ice. However, for CO colliding with the amorphous surface, a penetrating trajectory was observed to occur into a large water pore. The molecular dynamics calculations predict that the average potential energy of CO adsorbed to ice Ih is -10.1 +/- 0.2 and -8.4 +/- 0.2 kJ/mol for CO adsorbed to ice Ia. These values are in agreement with previous experimental and theoretical data. The distribution of the potential energy of CO adsorbed to ice Ia was found to be wider (with a standard deviation sigma of 2.4 kJ/mol) than that of CO interacting with ice Ih (sigma = 2.0 kJ/mol). In collisions with ice Ia, the CO molecules scatter at larger angles and over a wider distribution of angles than in collisions with ice Ih.