A search is presented for pair production of heavy vector-like T and B quarks in proton-proton collisions at A root s = 13 TeV. The data sample corresponds to an integrated luminosity of 35.9 fb(-1), collected with the CMS detector at the CERN LHC in 2016. Pair production of T quarks would result in a wide range of final states, since vector-like T quarks of charge 2e/3 are predicted to decay to bW, tZ, and tH. Likewise, vector-like B quarks are predicted to decay to tW, bZ, and bH. Three channels are considered, corresponding to final states with a single lepton, two leptons with the same sign of the electric charge, or at least three leptons. The results exclude T quarks with masses below 1140-1300 GeV and B quarks with masses below 910-1240 GeV for various branching fraction combinations, extending the reach of previous CMS searches by 200-600 GeV.