Differential and total cross sections and astrophysical S-factors for 2H(d,n)3He and 2H(d,p)3H reactions in a wide energy range