(NH4)2CO3 is a salt that can react with both acids and bases. When it dissolves in water, it forms ammonium ions and carbonate ions. The ammonium ions can act as weak acids and donate protons to water, while the carbonate ions can act as weak bases and accept protons from water. The pH of the solution depends on the relative strengths of the ammonium ions and the carbonate ions. If the carbonate ions are stronger bases than the ammonium ions are acids, the solution will be basic. The solution will be acidic if the ammonium ions are stronger acids than the carbonate ions are bases. If the ammonium ions and the carbonate ions have similar strengths, the solution will be neutral.