A metal X dissolves both in dilute HCl and dilute NaOH to liberate H2. Addition of NH4Cl and excess NH4OH to an HCl solution of X produce Y as a precipitate. Y is also produced by adding NH4Cl to the NaOH solution of X. The species X and Y, respectively, are: