The report on square ice sandwiched between two graphene layers by Algara-Silleret et al. [Nature 519, 443 (2015)] has generated a large interest in this system. Applying high lateral pressure on nanoconfined water we found that monolayer ice is transformed to bilayer ice when the two graphene layers are separated by H=6, 7Å. It was also found that three layers of a denser phase of ice with smaller lattice constant is formed if we start from bilayer ice and apply a lateral pressure of about 0.7 GPa with H=8, 9Å. The lattice constant (2.5Å-2.6Å) in both transitions is found to be smaller than those typically for the known phases of ice and water, i.e. 2.8Å. We validate these results using ab-initio calculations and found good agreement between ab-initio O-O distance and those obtained from classical MD simulations. The reversibility of the mentioned transitions are confirmed by decompressing the systems.