Structure and superconductivity of La1.8Sr0.2CuO4 and multi-phase Y1.2Ba0.8CuO4 under high pressure