New 2D-polymeric compound [Co2(μ-OH2)(μ-Piv)2(Piv)2(μ-L1)2]n (2) was synthesized in the reaction of the cobalt(II) pivalate [Co(Piv)2]n (1, Piv is an anion of pivalic acid) and pyrimidine (L1) in MeCN. 3D-polymer [Co5(μ-OH2)(μ3-OH)(μ3-Piv)(μ-Piv)5(Piv)3(μ-L2)4]n (3) was prepared by the reaction of the polymer [Co(Piv)2]n (1) with pyrazine (L2). Complexes 2 and 3 were characterized by the X-ray diffraction and magnetic susceptibility. It was shown that compound 2 undergoes antiferromagnetic ordering with weak ferromagnetism at TN = 4.5 K with σ0(2 K) = 4000 G cm3/mol.