The relativistic six-quark equations are constructed in the framework of the dispersion relation technique. The relativistic six-quark amplitudes of dibaryons including the light u, d and heavy c, b quarks are calculated. The approximate solutions of these equations using the method based on the extraction of leading singularities of the heavy hexaquark amplitudes are obtained. The poles of these amplitudes determine the masses of charmed and bottom dibaryons with the isospins I = 0, 1, 2 and the spin-parities J P = 0 + , 1 + , 2 + .