A search for a heavy scalar boson H decaying into a pair of lighter standard-model-like 125 GeV Higgs bosons hh and a search for a heavy pseudoscalar boson A decaying into a Z and an h boson are presented. The searches are performed on a data set corresponding to an integrated luminosity of 19.7 fb(-1) of pp collision data at a centre-of-mass energy of 8 TeV, collected by CMS in 2012. A final state consisting of two tau leptons and two b jets is used to search for the H -> hh decay. A final state consisting of two tau leptons from the h boson decay, and two additional leptons from the Z boson decay, is used to search for the decay A -> Zh. The results are interpreted in the context of two-Higgs-doublet models. No excess is found above the standard model expectation and upper limits are set on the heavy boson production cross sections in the mass ranges 260 < m(H) < 350 GeV and 220 < m(A) < 350 GeV. (C) 2016 CERN for the benefit of the CMS Collaboration. Published by Elsevier B.V.